diff options
author | Dave Chinner <david@fromorbit.com> | 2009-04-06 18:45:44 +0200 |
---|---|---|
committer | Christoph Hellwig <hch@brick.lst.de> | 2009-04-06 18:45:44 +0200 |
commit | 5825294edd3364cbba6514f70d88debec4f6cec7 (patch) | |
tree | 5462388cdb6b36b2f0f1cf75dc6ee60a7c643a23 /fs/xfs/linux-2.6/xfs_sync.h | |
parent | a8d770d987ee20b59fba6c37d7f0f2a351913c4b (diff) | |
download | linux-stable-5825294edd3364cbba6514f70d88debec4f6cec7.tar.gz linux-stable-5825294edd3364cbba6514f70d88debec4f6cec7.tar.bz2 linux-stable-5825294edd3364cbba6514f70d88debec4f6cec7.zip |
xfs: make inode flush at ENOSPC synchronous
When we are writing to a single file and hit ENOSPC, we trigger a background
flush of the inode and try again. Because we hold page locks and the iolock,
the flush won't proceed until after we release these locks. This occurs once
we've given up and ENOSPC has been reported. Hence if this one is the only
dirty inode in the system, we'll get an ENOSPC prematurely.
To fix this, remove the async flush from the allocation routines and move
it to the top of the write path where we can do a synchronous flush
and retry the write again. Only retry once as a second ENOSPC indicates
that we really are ENOSPC.
This avoids a page cache deadlock when trying to do this flush synchronously
in the allocation layer that was identified by Mikulas Patocka.
Signed-off-by: Dave Chinner <david@fromorbit.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_sync.h')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_sync.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/xfs/linux-2.6/xfs_sync.h b/fs/xfs/linux-2.6/xfs_sync.h index ec95e264805b..6e83a35626ed 100644 --- a/fs/xfs/linux-2.6/xfs_sync.h +++ b/fs/xfs/linux-2.6/xfs_sync.h @@ -44,7 +44,6 @@ int xfs_sync_fsdata(struct xfs_mount *mp, int flags); int xfs_quiesce_data(struct xfs_mount *mp); void xfs_quiesce_attr(struct xfs_mount *mp); -void xfs_flush_inode(struct xfs_inode *ip); void xfs_flush_inodes(struct xfs_inode *ip); int xfs_reclaim_inode(struct xfs_inode *ip, int locked, int sync_mode); |