nfs-utils: Allow users to disable mount option rewriting via norewriteopts mount option
Subsystems (2)
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
@@ -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)
Hello,
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.
Why are we adding a mount option to fix a broken server??
steved.
Quoted 25 lines
Signed-off-by Gregory Boyce <[email protected]>--- utils/mount/stropts.c | 8 ++++++++ 1 file changed, 8 insertions(+)utils/mount/stropts.c +8
-0@@ -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. */
Quoted 12 lines · Steve Dickson
Hello,
Quoted 1 line · Gregory Boyce
Allow users to disable mount option rewriting via norewriteopts mount
option.
Quoted 2 lines
This was required in our case in order to allow mounting a filer which inappropriately responded via the wrong interface.
Why are we adding a mount option to fix a broken server??
steved.
Sometimes you only control the client, and it's useful to have the option to interoperate.
--
Greg