Commit 86f2f450 authored by Nathan Scott's avatar Nathan Scott

[XFS] Fix remount readonly so it really wont write dummy log records

SGI Modid: 2.5.x-xfs:slinx:151423a
parent 3bdfdbd7
......@@ -90,7 +90,7 @@ typedef enum {
#define SYNC_BDFLUSH 0x0010 /* BDFLUSH is calling -- don't block */
#define SYNC_FSDATA 0x0020 /* flush fs data (e.g. superblocks) */
#define SYNC_REFCACHE 0x0040 /* prune some of the nfs ref cache */
#define SYNC_REMOUNT 0x0080 /* remount readonly, no dummy LRs */
typedef int (*vfs_mount_t)(bhv_desc_t *,
struct xfs_mount_args *, struct cred *);
......
......@@ -599,6 +599,8 @@ xfs_unmount(
return XFS_ERROR(error);
}
#define REMOUNT_READONLY_FLAGS (SYNC_REMOUNT|SYNC_ATTR|SYNC_WAIT)
STATIC int
xfs_mntupdate(
bhv_desc_t *bdp,
......@@ -623,7 +625,7 @@ xfs_mntupdate(
xfs_finish_reclaim_all(mp, 0);
do {
VFS_SYNC(vfsp, SYNC_ATTR|SYNC_WAIT, NULL, error);
VFS_SYNC(vfsp, REMOUNT_READONLY_FLAGS, NULL, error);
pagebuf_delwri_flush(mp->m_ddev_targp, PBDF_WAIT,
&pincount);
} while (pincount);
......@@ -1483,7 +1485,7 @@ xfs_syncsub(
/*
* Now check to see if the log needs a "dummy" transaction.
*/
if (xfs_log_need_covered(mp)) {
if (!(flags & SYNC_REMOUNT) && xfs_log_need_covered(mp)) {
xfs_trans_t *tp;
xfs_inode_t *ip;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment