Skip to contentSkip to conversation

nfs-utils: Allow users to disable mount option rewriting via norewriteopts mount option

PATCH In review Gregory Boyce 2 participants 4 messages Apr 20, 2015 – May 7, 2015

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

PATCH 1/1 nfs-utils: Allow users to disable mount option rewriting via norewriteopts mount option

Allow users to disable mount option rewriting via norewriteopts mount option.
This was required in our case in order to allow mounting a filer which inappropriately responded via the wrong interface.

---
 utils/mount/stropts.c | 8 ++++++++
 1 file changed, 8 insertions(+)
utils/mount/stropts.c +8 -0
index df67fac..bbda754 100644
@@ -534,6 +534,14 @@ nfs_rewrite_pmap_mount_options(struct mount_options *options, int checkv4)
 	struct pmap mnt_pmap;
 
 	/*
+	 * "norewriteopts" option bypasses the options rewriting
+	 */
+	if (po_contains(options, "norewriteopts") == PO_FOUND) {
+		po_remove_all(options, "norewriteopts");
+		return 1;
+	}
+
+	/*
 	 * Version and transport negotiation is not required
 	 * and does not work for RDMA mounts.
 	 */
Signature · 1 line
2.3.2 (Apple Git-55)
#1 lore raw
Quoted 4 lines · Gregory Boyce

Allow users to disable mount option rewriting via norewriteopts mount option.
This was required in our case in order to allow mounting a filer which inappropriately responded via the wrong interface.

Again... This is fixing a filer bug, correct?

We generally don't do that...

steved.

Quoted 23 lines
---
 utils/mount/stropts.c | 8 ++++++++
 1 file changed, 8 insertions(+)
utils/mount/stropts.c +8 -0
index df67fac..bbda754 100644
@@ -534,6 +534,14 @@ nfs_rewrite_pmap_mount_options(struct mount_options *options, int checkv4)
     struct pmap mnt_pmap;
 
     /*
+     * "norewriteopts" option bypasses the options rewriting
+     */
+    if (po_contains(options, "norewriteopts") == PO_FOUND) {
+        po_remove_all(options, "norewriteopts");
+        return 1;
+    }
+
+    /*
      * Version and transport negotiation is not required
      * and does not work for RDMA mounts.
      */
#2 lore raw
Quoted 6 lines · Steve Dickson
Quoted 3 lines · Gregory Boyce

Allow users to disable mount option rewriting via norewriteopts mount option.
This was required in our case in order to allow mounting a filer which inappropriately responded via the wrong interface.

Quoted 6 lines
Quoted 1 line

Again... This is fixing a filer bug, correct?

We generally don't do that...

steved.

This is working around a server bug on the client side, yes.

Signature · 1 line
Greg
#3 lore raw
Quoted 7 lines · Gregory Boyce
Quoted 6 lines · Steve Dickson
Quoted 3 lines · Gregory Boyce

Allow users to disable mount option rewriting via norewriteopts mount option.
This was required in our case in order to allow mounting a filer which inappropriately responded via the wrong interface.

Quoted 9 lines
Quoted 6 lines
Quoted 1 line

Again... This is fixing a filer bug, correct?

We generally don't do that...

steved.

This is working around a server bug on the client side, yes.

That's tough... We generally don't do that because its becomes a very slippy slope very quickly.... esp with adding a undocumented mount flag we are going have to support forever...

This is something I just don't think is the right thing to do so I'm going to NAK this patch.

steved.