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 commit4d559a3bcb
("xfs: limit speculative prealloc near ENOSPC thresholds") - Fix for the return type of xfs_iomap_eof_prealloc_initial_size from commita1e16c2666
("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()
This commit is contained in:
@@ -1334,6 +1334,12 @@ _xfs_buf_ioapply(
|
|||||||
int size;
|
int size;
|
||||||
int i;
|
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_WRITE) {
|
||||||
if (bp->b_flags & XBF_SYNCIO)
|
if (bp->b_flags & XBF_SYNCIO)
|
||||||
rw = WRITE_SYNC;
|
rw = WRITE_SYNC;
|
||||||
|
@@ -325,7 +325,7 @@ xfs_iomap_eof_want_preallocate(
|
|||||||
* rather than falling short due to things like stripe unit/width alignment of
|
* rather than falling short due to things like stripe unit/width alignment of
|
||||||
* real extents.
|
* real extents.
|
||||||
*/
|
*/
|
||||||
STATIC int
|
STATIC xfs_fsblock_t
|
||||||
xfs_iomap_eof_prealloc_initial_size(
|
xfs_iomap_eof_prealloc_initial_size(
|
||||||
struct xfs_mount *mp,
|
struct xfs_mount *mp,
|
||||||
struct xfs_inode *ip,
|
struct xfs_inode *ip,
|
||||||
@@ -413,7 +413,7 @@ xfs_iomap_prealloc_size(
|
|||||||
* have a large file on a small filesystem and the above
|
* have a large file on a small filesystem and the above
|
||||||
* lowspace thresholds are smaller than MAXEXTLEN.
|
* lowspace thresholds are smaller than MAXEXTLEN.
|
||||||
*/
|
*/
|
||||||
while (alloc_blocks >= freesp)
|
while (alloc_blocks && alloc_blocks >= freesp)
|
||||||
alloc_blocks >>= 4;
|
alloc_blocks >>= 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user