aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/linux-2.6/xfs_super.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2009-01-18 20:04:07 -0500
committerLachlan McIlroy <lachlan@sgi.com>2009-01-18 22:45:04 -0500
commit49739140e57a65114d9e1976c4c158d2145595fb (patch)
tree9295a472e8d4040c9504f3c8b2b9d29207772cd4 /fs/xfs/linux-2.6/xfs_super.c
parent5aa2dc0a0697c762874241fa9ddbecd2d878b934 (diff)
xfs: fix bad_features2 fixups for the root filesystem
Currently the bad_features2 fixup and the alignment updates in the superblock are skipped if we mount a filesystem read-only. But for the root filesystem the typical case is to mount read-only first and only later remount writeable so we'll never perform this update at all. It's not a big problem but means the logs of people needing the fixup get spammed at every boot because they never happen on disk. Reported-by: Arkadiusz Miskiewicz <arekm@maven.pl> Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_super.c')
-rw-r--r--fs/xfs/linux-2.6/xfs_super.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c
index 95a97108036..c71e226da7f 100644
--- a/fs/xfs/linux-2.6/xfs_super.c
+++ b/fs/xfs/linux-2.6/xfs_super.c
@@ -1197,6 +1197,7 @@ xfs_fs_remount(
1197 struct xfs_mount *mp = XFS_M(sb); 1197 struct xfs_mount *mp = XFS_M(sb);
1198 substring_t args[MAX_OPT_ARGS]; 1198 substring_t args[MAX_OPT_ARGS];
1199 char *p; 1199 char *p;
1200 int error;
1200 1201
1201 while ((p = strsep(&options, ",")) != NULL) { 1202 while ((p = strsep(&options, ",")) != NULL) {
1202 int token; 1203 int token;
@@ -1247,11 +1248,25 @@ xfs_fs_remount(
1247 } 1248 }
1248 } 1249 }
1249 1250
1250 /* rw/ro -> rw */ 1251 /* ro -> rw */
1251 if ((mp->m_flags & XFS_MOUNT_RDONLY) && !(*flags & MS_RDONLY)) { 1252 if ((mp->m_flags & XFS_MOUNT_RDONLY) && !(*flags & MS_RDONLY)) {
1252 mp->m_flags &= ~XFS_MOUNT_RDONLY; 1253 mp->m_flags &= ~XFS_MOUNT_RDONLY;
1253 if (mp->m_flags & XFS_MOUNT_BARRIER) 1254 if (mp->m_flags & XFS_MOUNT_BARRIER)
1254 xfs_mountfs_check_barriers(mp); 1255 xfs_mountfs_check_barriers(mp);
1256
1257 /*
1258 * If this is the first remount to writeable state we
1259 * might have some superblock changes to update.
1260 */
1261 if (mp->m_update_flags) {
1262 error = xfs_mount_log_sb(mp, mp->m_update_flags);
1263 if (error) {
1264 cmn_err(CE_WARN,
1265 "XFS: failed to write sb changes");
1266 return error;
1267 }
1268 mp->m_update_flags = 0;
1269 }
1255 } 1270 }
1256 1271
1257 /* rw -> ro */ 1272 /* rw -> ro */