Return-Path: Received: from mx1.redhat.com ([209.132.183.28]:8158 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752859AbdFUQ2E (ORCPT ); Wed, 21 Jun 2017 12:28:04 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D5F0A12B9 for ; Wed, 21 Jun 2017 16:18:37 +0000 (UTC) Received: from steved.boston.devel.redhat.com (ovpn-116-227.phx2.redhat.com [10.3.116.227]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9A05A60BEC for ; Wed, 21 Jun 2017 16:18:37 +0000 (UTC) Subject: Re: [PATCH 1/2 V3] mount.nfs: Use default minor version when -t nfs4 is specified To: Linux NFS Mailing list References: <20170619152526.26260-1-steved@redhat.com> From: Steve Dickson Message-ID: Date: Wed, 21 Jun 2017 12:18:37 -0400 MIME-Version: 1.0 In-Reply-To: <20170619152526.26260-1-steved@redhat.com> Content-Type: text/plain; charset=utf-8 Sender: linux-nfs-owner@vger.kernel.org List-ID: On 06/19/2017 11:25 AM, Steve Dickson wrote: > When the nfs4 filesystem specified, the default major > and minor versions should be used. > > v2: Added the NFS_DEFAULT_MAJOR/MINOR defines > v3: Add back the setting of v_mode to V_GENERAL in nfs_set_version() > > Signed-off-by: Steve Dickson Committed... steved. > --- > utils/mount/stropts.c | 15 ++++++++++++--- > 1 file changed, 12 insertions(+), 3 deletions(-) > > diff --git a/utils/mount/stropts.c b/utils/mount/stropts.c > index c0266e5..fbea6fb 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,7 +323,9 @@ static int nfs_set_version(struct nfsmount_info *mi) > return 0; > > if (strncmp(mi->type, "nfs4", 4) == 0) { > - mi->version.major = 4; > + /* Set to default values */ > + mi->version.major = NFS_DEFAULT_MAJOR; > + mi->version.minor = NFS_DEFAULT_MINOR; > mi->version.v_mode = V_GENERAL; > } > /* >