Skip to contentSkip to conversation

support for remount options in linux-2.5.24

PATCH New Jordan Breeding 1 participant 1 message Jun 26, 2002

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 support for remount options in linux-2.5.24

Hello,

This is a patch which simply takes the patch to support more options on remount for linux-2.4.18 and updates it to work with linux-2.5.24. Could this patch or something similar please be included in reiserfs in linux-2.5.24 so that the field for current mount options in /proc/fs/reiserfs/<filesystem>/super get updated properly when the filesystem is remounted. Thanks.

Jordan

fs/reiserfs/super.c +13 -1
diff -urN linux-2.5.24-orig/fs/reiserfs/super.c linux/fs/reiserfs/super.c
@@ -677,12 +677,24 @@
   struct reiserfs_super_block * rs;
   struct reiserfs_transaction_handle th ;
   unsigned long blocks;
-  unsigned long mount_options;
+  unsigned long mount_options = 0;
 
   rs = SB_DISK_SUPER_BLOCK (s);
 
   if (!reiserfs_parse_options(arg, &mount_options, &blocks, NULL))
     return -EINVAL;
+
+#define SET_OPT(opt, bits, super) \
+  if((bits) & (1 << (opt))) \
+    REISERFS_SB(super)->s_mount_opt |= (1 << (opt))
+
+  /* set options in the super-block bitmask */
+  SET_OPT(NOTAIL, mount_options, s);
+  SET_OPT(REISERFS_NO_BORDER, mount_options, s);
+  SET_OPT(REISERFS_NO_UNHASHED_RELOCATION, mount_options, s);
+  SET_OPT(REISERFS_HASHED_RELOCATION, mount_options, s);
+  SET_OPT(REISERFS_TEST4, mount_options, s);
+#undef SET_OPT
   
   if(blocks) {
     int rc = reiserfs_resize(s, blocks);