summaryrefslogtreecommitdiffstats
path: root/fs/xfs/linux-2.6/xfs_sync.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2009-06-08 15:35:48 +0200
committerChristoph Hellwig <hch@brick.lst.de>2009-06-08 15:35:48 +0200
commit075fe1028699f6a280545dfc2cfc5ac82d555c8c (patch)
treeaf17172ddc4d97d73b6a9a39f6dcf0ca2659fcdc /fs/xfs/linux-2.6/xfs_sync.h
parentfe588ed32867b42e0d906db558ca92fd9f8b128e (diff)
downloadlinux-075fe1028699f6a280545dfc2cfc5ac82d555c8c.tar.gz
linux-075fe1028699f6a280545dfc2cfc5ac82d555c8c.tar.bz2
linux-075fe1028699f6a280545dfc2cfc5ac82d555c8c.zip
xfs: split xfs_sync_inodes
xfs_sync_inodes is used to write back either file data or inode metadata. In general we always do these separately, except for one fishy case in xfs_fs_put_super that does both. So separate xfs_sync_inodes into separate xfs_sync_data and xfs_sync_attr functions. In xfs_fs_put_super we first call the data sync and then the attr sync as that was the previous order. The moved log force in that path doesn't make a difference because we will force the log again as part of the real unmount process. The filesystem readonly checks are not performed by the new function but instead moved into the callers, given that most callers alredy have it further up in the stack. Also add debug checks that we do not pass in incorrect flags in the new xfs_sync_data and xfs_sync_attr function and fix the one place that did pass in a wrong flag. Also remove a comment mentioning xfs_sync_inodes that has been incorrect for a while because we always take either the iolock or ilock in the sync path these days. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_sync.h')
-rw-r--r--fs/xfs/linux-2.6/xfs_sync.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/xfs/linux-2.6/xfs_sync.h b/fs/xfs/linux-2.6/xfs_sync.h
index 9bb1253a4023..26bfb5c42e76 100644
--- a/fs/xfs/linux-2.6/xfs_sync.h
+++ b/fs/xfs/linux-2.6/xfs_sync.h
@@ -29,8 +29,6 @@ typedef struct xfs_sync_work {
struct completion *w_completion;
} xfs_sync_work_t;
-#define SYNC_ATTR 0x0001 /* sync attributes */
-#define SYNC_DELWRI 0x0002 /* look at delayed writes */
#define SYNC_WAIT 0x0004 /* wait for i/o to complete */
#define SYNC_BDFLUSH 0x0008 /* BDFLUSH is calling -- don't block */
#define SYNC_IOWAIT 0x0010 /* wait for all I/O to complete */
@@ -39,7 +37,8 @@ typedef struct xfs_sync_work {
int xfs_syncd_init(struct xfs_mount *mp);
void xfs_syncd_stop(struct xfs_mount *mp);
-int xfs_sync_inodes(struct xfs_mount *mp, int flags);
+int xfs_sync_attr(struct xfs_mount *mp, int flags);
+int xfs_sync_data(struct xfs_mount *mp, int flags);
int xfs_sync_fsdata(struct xfs_mount *mp, int flags);
int xfs_quiesce_data(struct xfs_mount *mp);