[RFC PATCH v2 1/9] ext4: add handling for extended mount options

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Harshad Shirwadkar <harshadshirwadkar@xxxxxxxxx>

We are running out of mount option bits. Add handling for using
s_mount_opt2. This patch was originally submitted as a part of fast
commit patch series. Resending it here with this patch series too.

Signed-off-by: Harshad Shirwadkar <harshadshirwadkar@xxxxxxxxx>
Reviewed-by: Andreas Dilger <adilger@xxxxxxxxx>
---
 fs/ext4/super.c | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 13bdddc081e0..656eccf6fc9b 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -1738,6 +1738,7 @@ static int clear_qf_name(struct super_block *sb, int qtype)
 #define MOPT_EXT4_ONLY	(MOPT_NO_EXT2 | MOPT_NO_EXT3)
 #define MOPT_STRING	0x0400
 #define MOPT_SKIP	0x0800
+#define MOPT_2		0x1000
 
 static const struct mount_opts {
 	int	token;
@@ -2207,10 +2208,17 @@ static int handle_mount_opt(struct super_block *sb, char *opt, int token,
 			WARN_ON(1);
 			return -1;
 		}
-		if (arg != 0)
-			sbi->s_mount_opt |= m->mount_opt;
-		else
-			sbi->s_mount_opt &= ~m->mount_opt;
+		if (m->flags & MOPT_2) {
+			if (arg != 0)
+				sbi->s_mount_opt2 |= m->mount_opt;
+			else
+				sbi->s_mount_opt2 &= ~m->mount_opt;
+		} else {
+			if (arg != 0)
+				sbi->s_mount_opt |= m->mount_opt;
+			else
+				sbi->s_mount_opt &= ~m->mount_opt;
+		}
 	}
 	return 1;
 }
-- 
2.28.0.297.g1956fa8f8d-goog




[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux