diff options
Diffstat (limited to 'fs/xfs/xfs_vfsops.c')
-rw-r--r-- | fs/xfs/xfs_vfsops.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/fs/xfs/xfs_vfsops.c b/fs/xfs/xfs_vfsops.c index 92c1425d06ce..3a647339f40e 100644 --- a/fs/xfs/xfs_vfsops.c +++ b/fs/xfs/xfs_vfsops.c | |||
@@ -672,6 +672,7 @@ xfs_mntupdate( | |||
672 | } else if (!(vfsp->vfs_flag & VFS_RDONLY)) { /* rw -> ro */ | 672 | } else if (!(vfsp->vfs_flag & VFS_RDONLY)) { /* rw -> ro */ |
673 | bhv_vfs_sync(vfsp, SYNC_FSDATA|SYNC_BDFLUSH|SYNC_ATTR, NULL); | 673 | bhv_vfs_sync(vfsp, SYNC_FSDATA|SYNC_BDFLUSH|SYNC_ATTR, NULL); |
674 | xfs_quiesce_fs(mp); | 674 | xfs_quiesce_fs(mp); |
675 | xfs_log_sbcount(mp, 1); | ||
675 | xfs_log_unmount_write(mp); | 676 | xfs_log_unmount_write(mp); |
676 | xfs_unmountfs_writesb(mp); | 677 | xfs_unmountfs_writesb(mp); |
677 | vfsp->vfs_flag |= VFS_RDONLY; | 678 | vfsp->vfs_flag |= VFS_RDONLY; |
@@ -1497,6 +1498,15 @@ xfs_syncsub( | |||
1497 | } | 1498 | } |
1498 | 1499 | ||
1499 | /* | 1500 | /* |
1501 | * If asked, update the disk superblock with incore counter values if we | ||
1502 | * are using non-persistent counters so that they don't get too far out | ||
1503 | * of sync if we crash or get a forced shutdown. We don't want to force | ||
1504 | * this to disk, just get a transaction into the iclogs.... | ||
1505 | */ | ||
1506 | if (flags & SYNC_SUPER) | ||
1507 | xfs_log_sbcount(mp, 0); | ||
1508 | |||
1509 | /* | ||
1500 | * Now check to see if the log needs a "dummy" transaction. | 1510 | * Now check to see if the log needs a "dummy" transaction. |
1501 | */ | 1511 | */ |
1502 | 1512 | ||
@@ -1962,6 +1972,7 @@ xfs_freeze( | |||
1962 | ASSERT_ALWAYS(atomic_read(&mp->m_active_trans) == 0); | 1972 | ASSERT_ALWAYS(atomic_read(&mp->m_active_trans) == 0); |
1963 | 1973 | ||
1964 | /* Push the superblock and write an unmount record */ | 1974 | /* Push the superblock and write an unmount record */ |
1975 | xfs_log_sbcount(mp, 1); | ||
1965 | xfs_log_unmount_write(mp); | 1976 | xfs_log_unmount_write(mp); |
1966 | xfs_unmountfs_writesb(mp); | 1977 | xfs_unmountfs_writesb(mp); |
1967 | xfs_fs_log_dummy(mp); | 1978 | xfs_fs_log_dummy(mp); |