Skip to contentSkip to conversation

fix remount rw with unrecognized options

PATCH In review Christoph Hellwig 2 participants 4 messages Oct 12, 2008 XFS filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix remount rw with unrecognized options

When we skip unrecognized options in xfs_fs_remount we should just break out of the switch and not return because otherwise we may skip clearing the xfs-internal read-only flag. This will only show up on some operations like touch because most read-only checks are done by the VFS which things this filesystem is r/w. Eventually we should replace the XFS read-only flag with a helper that always checks the VFS flag to make sure they can never get out of sync.

Bug reported and fix verified by Marcel Beister on #xfs.

fs/xfs/linux-2.6/xfs_super.c +1 -1
Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_super.c
===================================================================
@@ -1218,7 +1218,7 @@ xfs_fs_remount(
 	"XFS: mount option \"%s\" not supported for remount\n", p);
 			return -EINVAL;
 #else
-			return 0;
+			break;
 #endif
 		}
 	}
#1 lore raw
Quoted 9 lines · Christoph Hellwig

When we skip unrecognized options in xfs_fs_remount we should just break out of the switch and not return because otherwise we may skip clearing the xfs-internal read-only flag. This will only show up on some operations like touch because most read-only checks are done by the VFS which things this filesystem is r/w. Eventually we should replace the XFS read-only flag with a helper that always checks the VFS flag to make sure they can never get out of sync.

Bug reported and fix verified by Marcel Beister on #xfs.

Seems reasonable.

I think this is 2.6.27.1 material?

-Eric

Quoted 18 lines

Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_super.c
===================================================================

fs/xfs/linux-2.6/xfs_super.c +1 -1
@@ -1218,7 +1218,7 @@ xfs_fs_remount(
 	"XFS: mount option \"%s\" not supported for remount\n", p);
 			return -EINVAL;
 #else
-			return 0;
+			break;
 #endif
 		}
 	}
#2 lore raw
Quoted 9 lines · Eric Sandeen
Quoted 8 lines · Christoph Hellwig

When we skip unrecognized options in xfs_fs_remount we should just break out of the switch and not return because otherwise we may skip clearing the xfs-internal read-only flag. This will only show up on some operations like touch because most read-only checks are done by the VFS which things this filesystem is r/w. Eventually we should replace the XFS read-only flag with a helper that always checks the VFS flag to make sure they can never get out of sync.

Quoted 5 lines
Quoted 1 line

Bug reported and fix verified by Marcel Beister on #xfs.

Seems reasonable.

I think this is 2.6.27.1 material?

Yes.

#3 lore raw
Quoted 10 lines · Christoph Hellwig
Quoted 9 lines · Eric Sandeen
Quoted 8 lines · Christoph Hellwig

When we skip unrecognized options in xfs_fs_remount we should just break out of the switch and not return because otherwise we may skip clearing the xfs-internal read-only flag. This will only show up on some operations like touch because most read-only checks are done by the VFS which things this filesystem is r/w. Eventually we should replace the XFS read-only flag with a helper that always checks the VFS flag to make sure they can never get out of sync.

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

Bug reported and fix verified by Marcel Beister on #xfs.

Seems reasonable.

I think this is 2.6.27.1 material?

Yes.

The recent bug on oss.sgi.com is probably the same; I'm updating it now.

-Eric