Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 10b38669 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'for-linus-v3.9-rc4' of git://oss.sgi.com/xfs/xfs

Pull XFS fixes from Ben Myers:

 - Fix for a potential infinite loop which was introduced in commit
   4d559a3b ("xfs: limit speculative prealloc near ENOSPC
   thresholds")

 - Fix for the return type of xfs_iomap_eof_prealloc_initial_size from
   commit a1e16c26 ("xfs: limit speculative prealloc size on sparse
   files")

 - Fix for a failed buffer readahead causing subsequent callers to fail
   incorrectly

* tag 'for-linus-v3.9-rc4' of git://oss.sgi.com/xfs/xfs:
  xfs: ensure we capture IO errors correctly
  xfs: fix xfs_iomap_eof_prealloc_initial_size type
  xfs: fix potential infinite loop in xfs_iomap_prealloc_size()
parents 547b5246 e0018738
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1334,6 +1334,12 @@ _xfs_buf_ioapply(
	int		size;
	int		i;

	/*
	 * Make sure we capture only current IO errors rather than stale errors
	 * left over from previous use of the buffer (e.g. failed readahead).
	 */
	bp->b_error = 0;

	if (bp->b_flags & XBF_WRITE) {
		if (bp->b_flags & XBF_SYNCIO)
			rw = WRITE_SYNC;
+2 −2
Original line number Diff line number Diff line
@@ -325,7 +325,7 @@ xfs_iomap_eof_want_preallocate(
 * rather than falling short due to things like stripe unit/width alignment of
 * real extents.
 */
STATIC int
STATIC xfs_fsblock_t
xfs_iomap_eof_prealloc_initial_size(
	struct xfs_mount	*mp,
	struct xfs_inode	*ip,
@@ -413,7 +413,7 @@ xfs_iomap_prealloc_size(
		 * have a large file on a small filesystem and the above
		 * lowspace thresholds are smaller than MAXEXTLEN.
		 */
		while (alloc_blocks >= freesp)
		while (alloc_blocks && alloc_blocks >= freesp)
			alloc_blocks >>= 4;
	}