kernel-ark/fs/xfs/linux-2.6
Dave Chinner 5825294edd 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>
2009-04-06 18:45:44 +02:00
..
kmem.c [XFS] kmem_free and kmem_realloc to use const void * 2008-07-28 16:58:43 +10:00
kmem.h [XFS] kmem_free and kmem_realloc to use const void * 2008-07-28 16:58:43 +10:00
mrlock.h
sv.h remove dead code from sv_t implementation 2008-12-04 15:39:21 +11:00
time.h
xfs_aops.c xfs: prevent unwritten extent conversion from blocking I/O completion 2009-04-06 18:42:11 +02:00
xfs_aops.h xfs: prevent unwritten extent conversion from blocking I/O completion 2009-04-06 18:42:11 +02:00
xfs_buf.c xfs: prevent unwritten extent conversion from blocking I/O completion 2009-04-06 18:42:11 +02:00
xfs_buf.h xfs: only issues a cache flush on unmount if barriers are enabled 2009-03-04 07:31:55 -06:00
xfs_cred.h [XFS] Fix merge failures 2008-12-29 16:47:18 +11:00
xfs_dmapi_priv.h
xfs_export.c [XFS] pass XFS_IGET_BULKSTAT to xfs_iget for handle operations 2009-01-09 15:17:17 +11:00
xfs_export.h
xfs_file.c [XFS] Use the incore inode size in xfs_file_readdir() 2008-12-22 17:50:56 +11:00
xfs_fs_subr.c xfs: use xfs_sync_inodes() for device flushing 2009-04-06 18:44:54 +02:00
xfs_fs_subr.h
xfs_globals.c [XFS] remove restricted chown parameter from xfs linux 2008-10-30 18:30:48 +11:00
xfs_globals.h CRED: Separate task security context from task_struct 2008-11-14 10:39:16 +11:00
xfs_ioctl32.c xfs: use mnt_want_write in compat_attrmulti ioctl 2009-01-19 02:03:03 +01:00
xfs_ioctl32.h [XFS] fix compile on 32 bit systems 2008-12-04 13:07:29 +11:00
xfs_ioctl.c xfs: include header files for prototypes 2009-03-06 17:21:16 -06:00
xfs_ioctl.h xfs: fix dentry aliasing issues in open_by_handle 2009-01-19 02:02:57 +01:00
xfs_iops.c xfs: kill ino64 mount option 2009-03-29 09:51:08 +02:00
xfs_iops.h [XFS] add a FMODE flag to make XFS invisible I/O less hacky 2008-12-11 13:14:41 +11:00
xfs_linux.h xfs: kill mutex_t typedef 2009-03-29 09:51:00 +02:00
xfs_lrw.c xfs: make inode flush at ENOSPC synchronous 2009-04-06 18:45:44 +02:00
xfs_lrw.h
xfs_quotaops.c xfs: get rid of indirections in the quotaops implementation 2009-02-09 08:47:34 +01:00
xfs_stats.c [XFS] fix spurious gcc warnings 2008-12-01 11:07:37 +11:00
xfs_stats.h [XFS] add new btree statistics 2008-10-30 16:55:03 +11:00
xfs_super.c xfs: kill ino64 mount option 2009-03-29 09:51:08 +02:00
xfs_super.h xfs: get rid of indirections in the quotaops implementation 2009-02-09 08:47:34 +01:00
xfs_sync.c xfs: make inode flush at ENOSPC synchronous 2009-04-06 18:45:44 +02:00
xfs_sync.h xfs: make inode flush at ENOSPC synchronous 2009-04-06 18:45:44 +02:00
xfs_sysctl.c [XFS] remove restricted chown parameter from xfs linux 2008-10-30 18:30:48 +11:00
xfs_sysctl.h [XFS] remove restricted chown parameter from xfs linux 2008-10-30 18:30:48 +11:00
xfs_version.h
xfs_vnode.h xfs: kill VN_BAD 2009-03-16 08:25:25 +01:00
xfs_xattr.c [XFS] Remove vn_revalidate calls in xfs. 2008-07-28 16:59:39 +10:00