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>

authored by

Christoph Hellwig and committed by
Christoph Hellwig
b0710ccc 075fe102

+4 -5
+4 -4
fs/xfs/linux-2.6/xfs_sync.c
··· 227 227 xfs_iunlock(ip, XFS_IOLOCK_SHARED); 228 228 229 229 out_wait: 230 - if (flags & SYNC_IOWAIT) 230 + if (flags & SYNC_WAIT) 231 231 xfs_ioend_wait(ip); 232 232 IRELE(ip); 233 233 return error; ··· 278 278 { 279 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 283 error = xfs_inode_ag_iterator(mp, xfs_sync_inode_data, flags, 284 284 XFS_ICI_NO_TAG); ··· 422 422 xfs_filestream_flush(mp); 423 423 424 424 /* push and block */ 425 - xfs_sync_data(mp, SYNC_WAIT|SYNC_IOWAIT); 425 + xfs_sync_data(mp, SYNC_WAIT); 426 426 xfs_qm_sync(mp, SYNC_WAIT); 427 427 428 428 /* write superblock and hoover up shutdown errors */ ··· 535 535 { 536 536 struct inode *inode = arg; 537 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 539 iput(inode); 540 540 } 541 541
-1
fs/xfs/linux-2.6/xfs_sync.h
··· 31 31 32 32 #define SYNC_WAIT 0x0004 /* wait for i/o to complete */ 33 33 #define SYNC_BDFLUSH 0x0008 /* BDFLUSH is calling -- don't block */ 34 - #define SYNC_IOWAIT 0x0010 /* wait for all I/O to complete */ 35 34 #define SYNC_TRYLOCK 0x0020 /* only try to lock inodes */ 36 35 37 36 int xfs_syncd_init(struct xfs_mount *mp);