From: NeilBrown <neilb@suse.com>
To: Steve Dickson <steved@redhat.com>,
Linux NFS Mailing list <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH 1/2 V2] mount.nfs: Use default minor version when -t nfs4 is specified
Date: Tue, 13 Jun 2017 10:59:18 +1000 [thread overview]
Message-ID: <87shj48zyx.fsf@notabene.neil.brown.name> (raw)
In-Reply-To: <20170609132608.12213-1-steved@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1876 bytes --]
On Fri, Jun 09 2017, Steve Dickson wrote:
> When the nfs4 filesystem specified, the default major
> and minor versions should be used.
>
> Signed-off-by: Steve Dickson <steved@redhat.com>
> ---
> utils/mount/stropts.c | 16 ++++++++++++----
> 1 file changed, 12 insertions(+), 4 deletions(-)
>
> diff --git a/utils/mount/stropts.c b/utils/mount/stropts.c
> index c0266e5..81fb945 100644
> --- a/utils/mount/stropts.c
> +++ b/utils/mount/stropts.c
> @@ -73,6 +73,13 @@
> #define NFS_DEF_BG_TIMEOUT_MINUTES (10000u)
> #endif
>
> +#ifndef NFS_DEFAULT_MAJOR
> +#define NFS_DEFAULT_MAJOR 4
> +#endif
> +#ifndef NFS_DEFAULT_MINOR
> +#define NFS_DEFAULT_MINOR 2
> +#endif
> +
> extern int nfs_mount_data_version;
> extern char *progname;
> extern int verbose;
> @@ -124,8 +131,8 @@ static void nfs_default_version(struct nfsmount_info *mi)
> }
>
> #endif /* MOUNT_CONFIG */
> - mi->version.major = 4;
> - mi->version.minor = 2;
> + mi->version.major = NFS_DEFAULT_MAJOR;
> + mi->version.minor = NFS_DEFAULT_MINOR;
> }
>
> /*
> @@ -316,8 +323,9 @@ static int nfs_set_version(struct nfsmount_info *mi)
> return 0;
>
> if (strncmp(mi->type, "nfs4", 4) == 0) {
> - mi->version.major = 4;
> - mi->version.v_mode = V_GENERAL;
> + /* Set to default values */
> + mi->version.major = NFS_DEFAULT_MAJOR;
> + mi->version.minor = NFS_DEFAULT_MINOR;
Why do you remove the setting of v_mode to V_GENERAL?
Won't that leave it as V_DEFAULT, and doesn't that mean
that it will negotiate from v4 down to v3??
NeilBrown
> }
> /*
> * Before 2.6.32, the kernel NFS client didn't
> --
> 2.9.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
next prev parent reply other threads:[~2017-06-13 0:59 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-09 13:26 [PATCH 1/2 V2] mount.nfs: Use default minor version when -t nfs4 is specified Steve Dickson
2017-06-09 13:26 ` [PATCH 2/2 V2] mount.nfs: Use default minor version when -o v4 " Steve Dickson
2017-06-13 1:19 ` NeilBrown
2017-06-13 15:21 ` Steve Dickson
2017-06-13 15:54 ` Steve Dickson
2017-06-14 2:09 ` NeilBrown
2017-06-14 10:03 ` Steve Dickson
2017-06-16 3:20 ` NeilBrown
2017-06-19 14:06 ` Steve Dickson
2017-06-20 4:40 ` NeilBrown
2017-06-13 0:59 ` NeilBrown [this message]
2017-06-13 15:26 ` [PATCH 1/2 V2] mount.nfs: Use default minor version when -t nfs4 " Steve Dickson
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=87shj48zyx.fsf@notabene.neil.brown.name \
--to=neilb@suse.com \
--cc=linux-nfs@vger.kernel.org \
--cc=steved@redhat.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.