aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/linux-2.6/xfs_super.c
diff options
context:
space:
mode:
authorDavid Chinner <david@fromorbit.com>2008-10-30 02:15:50 -0400
committerLachlan McIlroy <lachlan@sgi.com>2008-10-30 02:15:50 -0400
commite9f1c6ee12955fd8657f6f0f9a3d09112b1f1fdd (patch)
treee616bed4b4b6a8c0f38e87ff8de3fe9f070c9eab /fs/xfs/linux-2.6/xfs_super.c
parentbe97d9d5577f6c8a36588e2f262c772c5422b128 (diff)
[XFS] make SYNC_DELWRI no longer use xfs_sync
Continue to de-multiplex xfs_sync be replacing all SYNC_DELWRI callers with direct calls functions that do the work. Isolate the data quiesce case to a function in xfs_sync.c. Isolate the FSDATA case with explicit calls to xfs_sync_fsdata(). Version 2: o Push delwri related log forces into xfs_sync_inodes(). SGI-PV: 988140 SGI-Modid: xfs-linux-melb:xfs-kern:32309a Signed-off-by: David Chinner <david@fromorbit.com> Signed-off-by: Lachlan McIlroy <lachlan@sgi.com> Signed-off-by: Christoph Hellwig <hch@infradead.org>
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_super.c')
-rw-r--r--fs/xfs/linux-2.6/xfs_super.c25
1 files changed, 6 insertions, 19 deletions
diff --git a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c
index 38d380a7ca23..376f32d92475 100644
--- a/fs/xfs/linux-2.6/xfs_super.c
+++ b/fs/xfs/linux-2.6/xfs_super.c
@@ -998,7 +998,6 @@ xfs_fs_put_super(
998 int error; 998 int error;
999 999
1000 xfs_syncd_stop(mp); 1000 xfs_syncd_stop(mp);
1001 xfs_log_force(mp, 0, XFS_LOG_FORCE|XFS_LOG_SYNC);
1002 xfs_sync_inodes(mp, SYNC_ATTR|SYNC_DELWRI); 1001 xfs_sync_inodes(mp, SYNC_ATTR|SYNC_DELWRI);
1003 1002
1004#ifdef HAVE_DMAPI 1003#ifdef HAVE_DMAPI
@@ -1057,7 +1056,7 @@ xfs_fs_write_super(
1057 struct super_block *sb) 1056 struct super_block *sb)
1058{ 1057{
1059 if (!(sb->s_flags & MS_RDONLY)) 1058 if (!(sb->s_flags & MS_RDONLY))
1060 xfs_sync(XFS_M(sb), SYNC_FSDATA); 1059 xfs_sync_fsdata(XFS_M(sb), 0);
1061 sb->s_dirt = 0; 1060 sb->s_dirt = 0;
1062} 1061}
1063 1062
@@ -1068,7 +1067,6 @@ xfs_fs_sync_super(
1068{ 1067{
1069 struct xfs_mount *mp = XFS_M(sb); 1068 struct xfs_mount *mp = XFS_M(sb);
1070 int error; 1069 int error;
1071 int flags;
1072 1070
1073 /* 1071 /*
1074 * Treat a sync operation like a freeze. This is to work 1072 * Treat a sync operation like a freeze. This is to work
@@ -1082,20 +1080,10 @@ xfs_fs_sync_super(
1082 * dirty the Linux inode until after the transaction I/O 1080 * dirty the Linux inode until after the transaction I/O
1083 * completes. 1081 * completes.
1084 */ 1082 */
1085 if (wait || unlikely(sb->s_frozen == SB_FREEZE_WRITE)) { 1083 if (wait || unlikely(sb->s_frozen == SB_FREEZE_WRITE))
1086 /* 1084 error = xfs_quiesce_data(mp);
1087 * First stage of freeze - no more writers will make progress 1085 else
1088 * now we are here, so we flush delwri and delalloc buffers 1086 error = xfs_sync_fsdata(mp, 0);
1089 * here, then wait for all I/O to complete. Data is frozen at
1090 * that point. Metadata is not frozen, transactions can still
1091 * occur here so don't bother flushing the buftarg (i.e
1092 * SYNC_QUIESCE) because it'll just get dirty again.
1093 */
1094 flags = SYNC_DATA_QUIESCE;
1095 } else
1096 flags = SYNC_FSDATA;
1097
1098 error = xfs_sync(mp, flags);
1099 sb->s_dirt = 0; 1087 sb->s_dirt = 0;
1100 1088
1101 if (unlikely(laptop_mode)) { 1089 if (unlikely(laptop_mode)) {
@@ -1233,8 +1221,7 @@ xfs_fs_remount(
1233 1221
1234 /* rw -> ro */ 1222 /* rw -> ro */
1235 if (!(mp->m_flags & XFS_MOUNT_RDONLY) && (*flags & MS_RDONLY)) { 1223 if (!(mp->m_flags & XFS_MOUNT_RDONLY) && (*flags & MS_RDONLY)) {
1236 xfs_filestream_flush(mp); 1224 xfs_quiesce_data(mp);
1237 xfs_sync(mp, SYNC_DATA_QUIESCE);
1238 xfs_attr_quiesce(mp); 1225 xfs_attr_quiesce(mp);
1239 mp->m_flags |= XFS_MOUNT_RDONLY; 1226 mp->m_flags |= XFS_MOUNT_RDONLY;
1240 } 1227 }