summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Scott <nathans@sgi.com>2003-06-19 04:43:22 -0500
committerNathan Scott <nathans@sgi.com>2003-06-19 04:43:22 -0500
commit86f2f450d4b2648c645f775bfcdae2ddcff8c705 (patch)
tree276817d38e1c8c38d48ff731b293c56e38a29577
parent3bdfdbd79a8e82183ef6ec0ba1111ff5244bc317 (diff)
[XFS] Fix remount readonly so it really wont write dummy log records
SGI Modid: 2.5.x-xfs:slinx:151423a
-rw-r--r--fs/xfs/linux/xfs_vfs.h2
-rw-r--r--fs/xfs/xfs_vfsops.c6
2 files changed, 5 insertions, 3 deletions
diff --git a/fs/xfs/linux/xfs_vfs.h b/fs/xfs/linux/xfs_vfs.h
index c21a76607949..469da44bab75 100644
--- a/fs/xfs/linux/xfs_vfs.h
+++ b/fs/xfs/linux/xfs_vfs.h
@@ -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 *);
diff --git a/fs/xfs/xfs_vfsops.c b/fs/xfs/xfs_vfsops.c
index 2033b947fbbe..e575ffa1ba19 100644
--- a/fs/xfs/xfs_vfsops.c
+++ b/fs/xfs/xfs_vfsops.c
@@ -599,6 +599,8 @@ out:
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;