diff options
author | Christoph Hellwig <hch@lst.de> | 2009-06-08 09:37:11 -0400 |
---|---|---|
committer | Christoph Hellwig <hch@brick.lst.de> | 2009-06-08 09:37:11 -0400 |
commit | b0710ccc6d9fa8fb908b5f6d1b0782a09d80e24f (patch) | |
tree | 1cbb8a6e5d1257e4154d2117a61fcc37f54fee0d /fs/xfs/linux-2.6 | |
parent | 075fe1028699f6a280545dfc2cfc5ac82d555c8c (diff) |
xfs: remove SYNC_IOWAIT
We want to wait for all I/O to finish when we do data integrity syncs. So
there is no reason to keep SYNC_WAIT separate from SYNC_IOWAIT. This
causes a little change in behaviour for the ENOSPC flushing code which now
does a second submission and wait of buffered I/O, but that should finish
ASAP as we already did an asynchronous writeout earlier.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
Diffstat (limited to 'fs/xfs/linux-2.6')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_sync.c | 8 | ||||
-rw-r--r-- | fs/xfs/linux-2.6/xfs_sync.h | 1 |
2 files changed, 4 insertions, 5 deletions
diff --git a/fs/xfs/linux-2.6/xfs_sync.c b/fs/xfs/linux-2.6/xfs_sync.c index c1a9a1135073..32abd96b1095 100644 --- a/fs/xfs/linux-2.6/xfs_sync.c +++ b/fs/xfs/linux-2.6/xfs_sync.c | |||
@@ -227,7 +227,7 @@ xfs_sync_inode_data( | |||
227 | xfs_iunlock(ip, XFS_IOLOCK_SHARED); | 227 | xfs_iunlock(ip, XFS_IOLOCK_SHARED); |
228 | 228 | ||
229 | out_wait: | 229 | out_wait: |
230 | if (flags & SYNC_IOWAIT) | 230 | if (flags & SYNC_WAIT) |
231 | xfs_ioend_wait(ip); | 231 | xfs_ioend_wait(ip); |
232 | IRELE(ip); | 232 | IRELE(ip); |
233 | return error; | 233 | return error; |
@@ -278,7 +278,7 @@ xfs_sync_data( | |||
278 | { | 278 | { |
279 | int error; | 279 | int error; |
280 | 280 | ||
281 | ASSERT((flags & ~(SYNC_TRYLOCK|SYNC_WAIT|SYNC_IOWAIT)) == 0); | 281 | ASSERT((flags & ~(SYNC_TRYLOCK|SYNC_WAIT)) == 0); |
282 | 282 | ||
283 | error = xfs_inode_ag_iterator(mp, xfs_sync_inode_data, flags, | 283 | error = xfs_inode_ag_iterator(mp, xfs_sync_inode_data, flags, |
284 | XFS_ICI_NO_TAG); | 284 | XFS_ICI_NO_TAG); |
@@ -422,7 +422,7 @@ xfs_quiesce_data( | |||
422 | xfs_filestream_flush(mp); | 422 | xfs_filestream_flush(mp); |
423 | 423 | ||
424 | /* push and block */ | 424 | /* push and block */ |
425 | xfs_sync_data(mp, SYNC_WAIT|SYNC_IOWAIT); | 425 | xfs_sync_data(mp, SYNC_WAIT); |
426 | xfs_qm_sync(mp, SYNC_WAIT); | 426 | xfs_qm_sync(mp, SYNC_WAIT); |
427 | 427 | ||
428 | /* write superblock and hoover up shutdown errors */ | 428 | /* write superblock and hoover up shutdown errors */ |
@@ -535,7 +535,7 @@ xfs_flush_inodes_work( | |||
535 | { | 535 | { |
536 | struct inode *inode = arg; | 536 | struct inode *inode = arg; |
537 | xfs_sync_data(mp, SYNC_TRYLOCK); | 537 | xfs_sync_data(mp, SYNC_TRYLOCK); |
538 | xfs_sync_data(mp, SYNC_TRYLOCK | SYNC_IOWAIT); | 538 | xfs_sync_data(mp, SYNC_TRYLOCK | SYNC_WAIT); |
539 | iput(inode); | 539 | iput(inode); |
540 | } | 540 | } |
541 | 541 | ||
diff --git a/fs/xfs/linux-2.6/xfs_sync.h b/fs/xfs/linux-2.6/xfs_sync.h index 26bfb5c42e76..bda33a03e12b 100644 --- a/fs/xfs/linux-2.6/xfs_sync.h +++ b/fs/xfs/linux-2.6/xfs_sync.h | |||
@@ -31,7 +31,6 @@ typedef struct xfs_sync_work { | |||
31 | 31 | ||
32 | #define SYNC_WAIT 0x0004 /* wait for i/o to complete */ | 32 | #define SYNC_WAIT 0x0004 /* wait for i/o to complete */ |
33 | #define SYNC_BDFLUSH 0x0008 /* BDFLUSH is calling -- don't block */ | 33 | #define SYNC_BDFLUSH 0x0008 /* BDFLUSH is calling -- don't block */ |
34 | #define SYNC_IOWAIT 0x0010 /* wait for all I/O to complete */ | ||
35 | #define SYNC_TRYLOCK 0x0020 /* only try to lock inodes */ | 34 | #define SYNC_TRYLOCK 0x0020 /* only try to lock inodes */ |
36 | 35 | ||
37 | int xfs_syncd_init(struct xfs_mount *mp); | 36 | int xfs_syncd_init(struct xfs_mount *mp); |