diff options
author | Dave Chinner <david@fromorbit.com> | 2016-10-03 09:56:28 +1100 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2016-10-03 09:56:28 +1100 |
commit | 155cd433b516506df065866f3d974661f6473572 (patch) | |
tree | c16fcc875b58c39818377226ba0e5c8e44e6d324 /fs/xfs/xfs_mount.c | |
parent | a1f45e668e14c26b4700b1936c5a41b58cc4ac74 (diff) | |
parent | 5cd9cee98b256d94443d93a31efc36212a2bd634 (diff) |
Merge branch 'xfs-4.9-log-recovery-fixes' into for-next
Diffstat (limited to 'fs/xfs/xfs_mount.c')
-rw-r--r-- | fs/xfs/xfs_mount.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c index faeead671f9f..56e85a6c85c7 100644 --- a/fs/xfs/xfs_mount.c +++ b/fs/xfs/xfs_mount.c @@ -934,6 +934,20 @@ xfs_mountfs( } /* + * Now the log is fully replayed, we can transition to full read-only + * mode for read-only mounts. This will sync all the metadata and clean + * the log so that the recovery we just performed does not have to be + * replayed again on the next mount. + * + * We use the same quiesce mechanism as the rw->ro remount, as they are + * semantically identical operations. + */ + if ((mp->m_flags & (XFS_MOUNT_RDONLY|XFS_MOUNT_NORECOVERY)) == + XFS_MOUNT_RDONLY) { + xfs_quiesce_attr(mp); + } + + /* * Complete the quota initialisation, post-log-replay component. */ if (quotamount) { |