linux-cifs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steve French <smfrench@gmail.com>
To: CIFS <linux-cifs@vger.kernel.org>
Subject: [PATCH][CIFS] correct four aliased mount parms to allow use of previous names
Date: Wed, 16 Dec 2020 01:49:27 -0600	[thread overview]
Message-ID: <CAH2r5ms=V-6bC=P2BEp_xQMiGp93JM7Oi_3Pa6CSACY97y4FoA@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 415 bytes --]

    The updates to the new mount API created aliases for some
    mount parms e.g.

       esize, idsfromsid, modefromsid, signloosely
    as
       "min_enc_offload", "setuidfromacl", "modesid", "ignore_signature"

    but did not add back in the original name expected by test cases
    and current users.  It also had incorrect names for a few
    less used mount parms.

See attached patch


-- 
Thanks,

Steve

[-- Attachment #2: 0001-cifs-correct-four-aliased-mount-parms-to-allow-use-o.patch --]
[-- Type: text/x-patch, Size: 3402 bytes --]

From 27cf94853e6d2b5c981ed4d9f798912027352584 Mon Sep 17 00:00:00 2001
From: Steve French <stfrench@microsoft.com>
Date: Wed, 16 Dec 2020 01:22:54 -0600
Subject: [PATCH] cifs: correct four aliased mount parms to allow use of
 previous names

The updates to the new mount API created aliases for some
mount parms e.g.

   esize, idsfromsid, modefromsid, signloosely
as
   "min_enc_offload", "setuidfromacl", "modesid", "ignore_signature"

but did not add back in the original name expected by test cases
and current users.  It also had incorrect names for a few
less used mount parms.

Signed-off-by: Steve French <stfrench@microsoft.com>
Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
---
 fs/cifs/fs_context.c | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/fs/cifs/fs_context.c b/fs/cifs/fs_context.c
index c427e494ea56..29b99e68ec80 100644
--- a/fs/cifs/fs_context.c
+++ b/fs/cifs/fs_context.c
@@ -94,6 +94,7 @@ const struct fs_parameter_spec smb3_fs_parameters[] = {
 	fsparam_flag("forcemandatorylock", Opt_forcemandatorylock),
 	fsparam_flag("forcemand", Opt_forcemandatorylock),
 	fsparam_flag("setuidfromacl", Opt_setuidfromacl),
+	fsparam_flag("idsfromsid", Opt_setuidfromacl),
 	fsparam_flag_no("setuids", Opt_setuids),
 	fsparam_flag_no("dynperm", Opt_dynperm),
 	fsparam_flag_no("intr", Opt_intr),
@@ -105,6 +106,7 @@ const struct fs_parameter_spec smb3_fs_parameters[] = {
 	fsparam_flag("locallease", Opt_locallease),
 	fsparam_flag("sign", Opt_sign),
 	fsparam_flag("ignore_signature", Opt_ignore_signature),
+	fsparam_flag("signloosely", Opt_ignore_signature),
 	fsparam_flag("seal", Opt_seal),
 	fsparam_flag("noac", Opt_noac),
 	fsparam_flag("fsc", Opt_fsc),
@@ -112,11 +114,12 @@ const struct fs_parameter_spec smb3_fs_parameters[] = {
 	fsparam_flag("multiuser", Opt_multiuser),
 	fsparam_flag("sloppy", Opt_sloppy),
 	fsparam_flag("nosharesock", Opt_nosharesock),
-	fsparam_flag_no("persistent", Opt_persistent),
-	fsparam_flag_no("resilient", Opt_resilient),
+	fsparam_flag_no("persistenthandles", Opt_persistent),
+	fsparam_flag_no("resilienthandles", Opt_resilient),
 	fsparam_flag("domainauto", Opt_domainauto),
 	fsparam_flag("rdma", Opt_rdma),
 	fsparam_flag("modesid", Opt_modesid),
+	fsparam_flag("modefromsid", Opt_modesid),
 	fsparam_flag("rootfs", Opt_rootfs),
 	fsparam_flag("compress", Opt_compress),
 	fsparam_flag("witness", Opt_witness),
@@ -132,6 +135,7 @@ const struct fs_parameter_spec smb3_fs_parameters[] = {
 	fsparam_u32("dir_mode", Opt_dirmode),
 	fsparam_u32("port", Opt_port),
 	fsparam_u32("min_enc_offload", Opt_min_enc_offload),
+	fsparam_u32("esize", Opt_min_enc_offload),
 	fsparam_u32("bsize", Opt_blocksize),
 	fsparam_u32("rsize", Opt_rsize),
 	fsparam_u32("wsize", Opt_wsize),
@@ -1212,14 +1216,15 @@ static int smb3_fs_context_parse_param(struct fs_context *fc,
 		break;
 	case Opt_persistent:
 		if (result.negated) {
-			if ((ctx->nopersistent) || (ctx->resilient)) {
+			ctx->nopersistent = true;
+			if (ctx->persistent) {
 				cifs_dbg(VFS,
 				  "persistenthandles mount options conflict\n");
 				goto cifs_parse_mount_err;
 			}
 		} else {
-			ctx->nopersistent = true;
-			if (ctx->persistent) {
+			ctx->persistent = true;
+			if ((ctx->nopersistent) || (ctx->resilient)) {
 				cifs_dbg(VFS,
 				  "persistenthandles mount options conflict\n");
 				goto cifs_parse_mount_err;
-- 
2.27.0


                 reply	other threads:[~2020-12-16  7:50 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAH2r5ms=V-6bC=P2BEp_xQMiGp93JM7Oi_3Pa6CSACY97y4FoA@mail.gmail.com' \
    --to=smfrench@gmail.com \
    --cc=linux-cifs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).