diff options
author | Dave Chinner <david@fromorbit.com> | 2009-04-06 18:47:27 +0200 |
---|---|---|
committer | Christoph Hellwig <hch@brick.lst.de> | 2009-04-06 18:47:27 +0200 |
commit | e43afd72d2455defd63a3f94f22fa09b586e58ed (patch) | |
tree | a883a748374d5f63bf030dcf445723a901f88357 /fs/xfs/linux-2.6/xfs_sync.h | |
parent | 5825294edd3364cbba6514f70d88debec4f6cec7 (diff) | |
download | kernel_samsung_tuna-e43afd72d2455defd63a3f94f22fa09b586e58ed.zip kernel_samsung_tuna-e43afd72d2455defd63a3f94f22fa09b586e58ed.tar.gz kernel_samsung_tuna-e43afd72d2455defd63a3f94f22fa09b586e58ed.tar.bz2 |
xfs: block callers of xfs_flush_inodes() correctly
xfs_flush_inodes() currently uses a magic timeout to wait for
some inodes to be flushed before returning. This isn't
really reliable but used to be the best that could be done
due to deadlock potential of waiting for the entire flush.
Now the inode flush is safe to execute while we hold page
and inode locks, we can wait for all the inodes to flush
synchronously. Convert the wait mechanism to a completion
to do this efficiently. This should remove all remaining
spurious ENOSPC errors from the delayed allocation reservation
path.
This is extracted almost line for line from a larger patch
from Mikulas Patocka.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
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, 1 insertions, 0 deletions
diff --git a/fs/xfs/linux-2.6/xfs_sync.h b/fs/xfs/linux-2.6/xfs_sync.h index 6e83a35..308d5bf 100644 --- a/fs/xfs/linux-2.6/xfs_sync.h +++ b/fs/xfs/linux-2.6/xfs_sync.h @@ -26,6 +26,7 @@ typedef struct xfs_sync_work { struct xfs_mount *w_mount; void *w_data; /* syncer routine argument */ void (*w_syncer)(struct xfs_mount *, void *); + struct completion *w_completion; } xfs_sync_work_t; #define SYNC_ATTR 0x0001 /* sync attributes */ |