Skip to contentSkip to conversation

cifs: reinstate the forcegid option

PATCH In review Jeff Layton 4 participants 6 messages Oct 3, 2012 – Oct 4, 2012 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cifs: reinstate the forcegid option

Apparently this was lost when we converted to the standard option parser.

---
 fs/cifs/connect.c | 9 +++++++++
 1 file changed, 9 insertions(+)
fs/cifs/connect.c +9 -0
index 2fdbe08..5c670b9 100644
@@ -67,6 +67,7 @@ enum {
 	/* Mount options that take no arguments */
 	Opt_user_xattr, Opt_nouser_xattr,
 	Opt_forceuid, Opt_noforceuid,
+	Opt_forcegid, Opt_noforcegid,
 	Opt_noblocksend, Opt_noautotune,
 	Opt_hard, Opt_soft, Opt_perm, Opt_noperm,
 	Opt_mapchars, Opt_nomapchars, Opt_sfu,
@@ -117,6 +118,8 @@ static const match_table_t cifs_mount_option_tokens = {
 	{ Opt_nouser_xattr, "nouser_xattr" },
 	{ Opt_forceuid, "forceuid" },
 	{ Opt_noforceuid, "noforceuid" },
+	{ Opt_forcegid, "forcegid" },
+	{ Opt_noforcegid, "noforcegid" },
 	{ Opt_noblocksend, "noblocksend" },
 	{ Opt_noautotune, "noautotune" },
 	{ Opt_hard, "hard" },
@@ -1195,6 +1198,12 @@ cifs_parse_mount_options(const char *mountdata, const char *devname,
 		case Opt_noforceuid:
 			override_uid = 0;
 			break;
+		case Opt_forcegid:
+			override_gid = 1;
+			break;
+		case Opt_noforcegid:
+			override_gid = 0;
+			break;
 		case Opt_noblocksend:
 			vol->noblocksnd = 1;
 			break;
Signature · 1 line
1.7.11.4

A message that is not in the archive (sent off-list or not yet received): 1349294556-20656-1-git-send-email-jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org

Reviewed-by
#2 lore raw
Quoted 6 lines · Jeff Layton

Apparently this was lost when we converted to the standard option parser.

Quoted 38 lines
---
 fs/cifs/connect.c | 9 +++++++++
 1 file changed, 9 insertions(+)
fs/cifs/connect.c +9 -0
index 2fdbe08..5c670b9 100644
@@ -67,6 +67,7 @@ enum {
 	/* Mount options that take no arguments */
 	Opt_user_xattr, Opt_nouser_xattr,
 	Opt_forceuid, Opt_noforceuid,
+	Opt_forcegid, Opt_noforcegid,
 	Opt_noblocksend, Opt_noautotune,
 	Opt_hard, Opt_soft, Opt_perm, Opt_noperm,
 	Opt_mapchars, Opt_nomapchars, Opt_sfu,
@@ -117,6 +118,8 @@ static const match_table_t cifs_mount_option_tokens = {
 	{ Opt_nouser_xattr, "nouser_xattr" },
 	{ Opt_forceuid, "forceuid" },
 	{ Opt_noforceuid, "noforceuid" },
+	{ Opt_forcegid, "forcegid" },
+	{ Opt_noforcegid, "noforcegid" },
 	{ Opt_noblocksend, "noblocksend" },
 	{ Opt_noautotune, "noautotune" },
 	{ Opt_hard, "hard" },
@@ -1195,6 +1198,12 @@ cifs_parse_mount_options(const char *mountdata, const char *devname,
 		case Opt_noforceuid:
 			override_uid = 0;
 			break;
+		case Opt_forcegid:
+			override_gid = 1;
+			break;
+		case Opt_noforcegid:
+			override_gid = 0;
+			break;
 		case Opt_noblocksend:
 			vol->noblocksnd = 1;
 			break;
#3 lore raw
In reply to a message not in the archive
Quoted 7 lines · Jeff Layton

Apparently this was lost when we converted to the standard option parser.

---

Oops, atleast a couple of options have been reported missing and fixed so far. Time to audit the new parsing code so that we fix them proactively before we get reports from users..?

Thanks
Suresh

A message that is not in the archive (sent off-list or not yet received): 506D8C16.6070408-IBi9RG/[email protected]

#5 lore raw
Quoted 9 lines · Suresh Jayaraman
Quoted 7 lines · Jeff Layton

Apparently this was lost when we converted to the standard option parser.

---

Quoted 8 lines

Oops, atleast a couple of options have been reported missing and fixed so far. Time to audit the new parsing code so that we fix them proactively before we get reports from users..?

Thanks
Suresh

Seems like every time we play with the parsing code an option gets dropped. It's difficult though because there are over 80 options at this point. :/
I'll take a look over the code too.

Signature · 2 lines
Peace and Blessings,
-Scott.
#6 lore raw
In reply to a message not in the archive
Quoted 4 lines · Suresh Jayaraman
Quoted 3 lines · Jeff Layton

Apparently this was lost when we converted to the standard option parser.

Quoted 9 lines
Quoted 4 lines

---

Oops, atleast a couple of options have been reported missing and fixed so far. Time to audit the new parsing code so that we fix them proactively before we get reports from users..?

I am taking another look at the code to compare the options supported against the old parser with the new parser. Some gotchas which tripped me last time were checks for shortened options which also matched the longer versions of the mount options.

We should also start thinking about paring down the number of mount options which in my opinion are on the high side.

Sachin Prabhu

#7 lore raw
Quoted 15 lines · Sachin Prabhu
Quoted 4 lines · Suresh Jayaraman
Quoted 3 lines · Jeff Layton

Apparently this was lost when we converted to the standard option parser.

Quoted 9 lines
Quoted 4 lines

---

Oops, atleast a couple of options have been reported missing and fixed so far. Time to audit the new parsing code so that we fix them proactively before we get reports from users..?

Quoted 7 lines

I am taking another look at the code to compare the options supported against the old parser with the new parser. Some gotchas which tripped me last time were checks for shortened options which also matched the longer versions of the mount options.

We should also start thinking about paring down the number of mount options which in my opinion are on the high side.

I've done a quick check by parsing the older cifs_parse_mount_options to print out the list of mount options supported and compared this output to the list of mount options supported by the current parser and it appears that following the forcegid/noforcegid option, we have accounted for all the other mount options.

There have been a number of mount options which have changed since.
example: cache, vers. These have been accounted for.

Sachin Prabhu