* [PATCH 1/2] NFS: dont allow minorversion= opt when vers != 4 @ 2012-02-01 19:00 Weston Andros Adamson 2012-02-01 19:00 ` [PATCH 2/2] NFS: add mount option 'v4.1' Weston Andros Adamson 0 siblings, 1 reply; 16+ messages in thread From: Weston Andros Adamson @ 2012-02-01 19:00 UTC (permalink / raw) To: Trond.Myklebust; +Cc: linux-nfs, Weston Andros Adamson Don't allow invalid 'vers' and 'minorversion' combinations in mount options, such as "vers=3,minorversion=1". Signed-off-by: Weston Andros Adamson <dros@netapp.com> --- fs/nfs/super.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/fs/nfs/super.c b/fs/nfs/super.c index 8e210b2..50baca1 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c @@ -1519,6 +1519,9 @@ static int nfs_parse_mount_options(char *raw, if (!sloppy && invalid_option) return 0; + if (mnt->minorversion && mnt->version != 4) + goto out_minorversion_mismatch; + /* * verify that any proto=/mountproto= options match the address * familiies in the addr=/mountaddr= options. @@ -1552,6 +1555,10 @@ out_invalid_address: out_invalid_value: printk(KERN_INFO "NFS: bad mount option value specified: %s\n", p); return 0; +out_minorversion_mismatch: + printk(KERN_INFO "NFS: mount option vers=%d does not support " + "minorversion=%u\n", mnt->version, mnt->minorversion); + return 0; out_nomem: printk(KERN_INFO "NFS: not enough memory to parse option\n"); return 0; -- 1.7.4.4 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 2/2] NFS: add mount option 'v4.1' 2012-02-01 19:00 [PATCH 1/2] NFS: dont allow minorversion= opt when vers != 4 Weston Andros Adamson @ 2012-02-01 19:00 ` Weston Andros Adamson 2012-02-01 19:17 ` Chuck Lever 0 siblings, 1 reply; 16+ messages in thread From: Weston Andros Adamson @ 2012-02-01 19:00 UTC (permalink / raw) To: Trond.Myklebust; +Cc: linux-nfs, Weston Andros Adamson Signed-off-by: Weston Andros Adamson <dros@netapp.com> --- I was already messing around with mountoptions and figured "why not". It's been joked (?) that 4.1 really should have been NFSv5! fs/nfs/super.c | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/fs/nfs/super.c b/fs/nfs/super.c index 50baca1..801b060 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c @@ -80,7 +80,7 @@ enum { Opt_cto, Opt_nocto, Opt_ac, Opt_noac, Opt_lock, Opt_nolock, - Opt_v2, Opt_v3, Opt_v4, + Opt_v2, Opt_v3, Opt_v4, Opt_v4_1, Opt_udp, Opt_tcp, Opt_rdma, Opt_acl, Opt_noacl, Opt_rdirplus, Opt_nordirplus, @@ -136,6 +136,7 @@ static const match_table_t nfs_mount_option_tokens = { { Opt_v2, "v2" }, { Opt_v3, "v3" }, { Opt_v4, "v4" }, + { Opt_v4_1, "v4.1" }, { Opt_udp, "udp" }, { Opt_tcp, "tcp" }, { Opt_rdma, "rdma" }, @@ -1172,6 +1173,11 @@ static int nfs_parse_mount_options(char *raw, mnt->flags &= ~NFS_MOUNT_VER3; mnt->version = 4; break; + case Opt_v4_1: + mnt->flags &= ~NFS_MOUNT_VER3; + mnt->version = 4; + mnt->minorversion = 1; + break; case Opt_udp: mnt->flags &= ~NFS_MOUNT_TCP; mnt->nfs_server.protocol = XPRT_TRANSPORT_UDP; -- 1.7.4.4 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH 2/2] NFS: add mount option 'v4.1' 2012-02-01 19:00 ` [PATCH 2/2] NFS: add mount option 'v4.1' Weston Andros Adamson @ 2012-02-01 19:17 ` Chuck Lever 2012-02-01 19:38 ` Adamson, Dros 2012-02-01 19:46 ` Myklebust, Trond 0 siblings, 2 replies; 16+ messages in thread From: Chuck Lever @ 2012-02-01 19:17 UTC (permalink / raw) To: Weston Andros Adamson; +Cc: Trond.Myklebust, linux-nfs Hi- I think we should co-ordinate with Solaris on this administrative interface. Can we discuss in Santa Clara? On Feb 1, 2012, at 2:00 PM, Weston Andros Adamson wrote: > > Signed-off-by: Weston Andros Adamson <dros@netapp.com> > --- > I was already messing around with mountoptions and figured "why not". > It's been joked (?) that 4.1 really should have been NFSv5! > > fs/nfs/super.c | 8 +++++++- > 1 files changed, 7 insertions(+), 1 deletions(-) > > diff --git a/fs/nfs/super.c b/fs/nfs/super.c > index 50baca1..801b060 100644 > --- a/fs/nfs/super.c > +++ b/fs/nfs/super.c > @@ -80,7 +80,7 @@ enum { > Opt_cto, Opt_nocto, > Opt_ac, Opt_noac, > Opt_lock, Opt_nolock, > - Opt_v2, Opt_v3, Opt_v4, > + Opt_v2, Opt_v3, Opt_v4, Opt_v4_1, > Opt_udp, Opt_tcp, Opt_rdma, > Opt_acl, Opt_noacl, > Opt_rdirplus, Opt_nordirplus, > @@ -136,6 +136,7 @@ static const match_table_t nfs_mount_option_tokens = { > { Opt_v2, "v2" }, > { Opt_v3, "v3" }, > { Opt_v4, "v4" }, > + { Opt_v4_1, "v4.1" }, > { Opt_udp, "udp" }, > { Opt_tcp, "tcp" }, > { Opt_rdma, "rdma" }, > @@ -1172,6 +1173,11 @@ static int nfs_parse_mount_options(char *raw, > mnt->flags &= ~NFS_MOUNT_VER3; > mnt->version = 4; > break; > + case Opt_v4_1: > + mnt->flags &= ~NFS_MOUNT_VER3; > + mnt->version = 4; > + mnt->minorversion = 1; > + break; > case Opt_udp: > mnt->flags &= ~NFS_MOUNT_TCP; > mnt->nfs_server.protocol = XPRT_TRANSPORT_UDP; > -- > 1.7.4.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 -- Chuck Lever chuck[dot]lever[at]oracle[dot]com ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 2/2] NFS: add mount option 'v4.1' 2012-02-01 19:17 ` Chuck Lever @ 2012-02-01 19:38 ` Adamson, Dros 2012-02-01 19:46 ` Myklebust, Trond 1 sibling, 0 replies; 16+ messages in thread From: Adamson, Dros @ 2012-02-01 19:38 UTC (permalink / raw) To: Chuck Lever; +Cc: Myklebust, Trond, <linux-nfs@vger.kernel.org> [-- Attachment #1: Type: text/plain, Size: 1938 bytes --] Fine with me. -dros On Feb 1, 2012, at 2:17 PM, Chuck Lever wrote: > Hi- > > I think we should co-ordinate with Solaris on this administrative interface. Can we discuss in Santa Clara? > > On Feb 1, 2012, at 2:00 PM, Weston Andros Adamson wrote: > >> >> Signed-off-by: Weston Andros Adamson <dros@netapp.com> >> --- >> I was already messing around with mountoptions and figured "why not". >> It's been joked (?) that 4.1 really should have been NFSv5! >> >> fs/nfs/super.c | 8 +++++++- >> 1 files changed, 7 insertions(+), 1 deletions(-) >> >> diff --git a/fs/nfs/super.c b/fs/nfs/super.c >> index 50baca1..801b060 100644 >> --- a/fs/nfs/super.c >> +++ b/fs/nfs/super.c >> @@ -80,7 +80,7 @@ enum { >> Opt_cto, Opt_nocto, >> Opt_ac, Opt_noac, >> Opt_lock, Opt_nolock, >> - Opt_v2, Opt_v3, Opt_v4, >> + Opt_v2, Opt_v3, Opt_v4, Opt_v4_1, >> Opt_udp, Opt_tcp, Opt_rdma, >> Opt_acl, Opt_noacl, >> Opt_rdirplus, Opt_nordirplus, >> @@ -136,6 +136,7 @@ static const match_table_t nfs_mount_option_tokens = { >> { Opt_v2, "v2" }, >> { Opt_v3, "v3" }, >> { Opt_v4, "v4" }, >> + { Opt_v4_1, "v4.1" }, >> { Opt_udp, "udp" }, >> { Opt_tcp, "tcp" }, >> { Opt_rdma, "rdma" }, >> @@ -1172,6 +1173,11 @@ static int nfs_parse_mount_options(char *raw, >> mnt->flags &= ~NFS_MOUNT_VER3; >> mnt->version = 4; >> break; >> + case Opt_v4_1: >> + mnt->flags &= ~NFS_MOUNT_VER3; >> + mnt->version = 4; >> + mnt->minorversion = 1; >> + break; >> case Opt_udp: >> mnt->flags &= ~NFS_MOUNT_TCP; >> mnt->nfs_server.protocol = XPRT_TRANSPORT_UDP; >> -- >> 1.7.4.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 > > -- > Chuck Lever > chuck[dot]lever[at]oracle[dot]com > > > > [-- Attachment #2: smime.p7s --] [-- Type: application/pkcs7-signature, Size: 1374 bytes --] ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 2/2] NFS: add mount option 'v4.1' 2012-02-01 19:17 ` Chuck Lever 2012-02-01 19:38 ` Adamson, Dros @ 2012-02-01 19:46 ` Myklebust, Trond 2012-02-01 19:48 ` Chuck Lever 1 sibling, 1 reply; 16+ messages in thread From: Myklebust, Trond @ 2012-02-01 19:46 UTC (permalink / raw) To: Chuck Lever; +Cc: Adamson, Dros, linux-nfs@vger.kernel.org T24gV2VkLCAyMDEyLTAyLTAxIGF0IDE0OjE3IC0wNTAwLCBDaHVjayBMZXZlciB3cm90ZToNCj4g SGktDQo+IA0KPiBJIHRoaW5rIHdlIHNob3VsZCBjby1vcmRpbmF0ZSB3aXRoIFNvbGFyaXMgb24g dGhpcyBhZG1pbmlzdHJhdGl2ZSBpbnRlcmZhY2UuICBDYW4gd2UgZGlzY3VzcyBpbiBTYW50YSBD bGFyYT8NCg0KVW5sZXNzIHRoZXkgaGF2ZSBhIHN0cm9uZyBhcmd1bWVudCBmb3Igd2h5IHRoaXMg aXMgYSBiYWQgaWRlYSwgSSBwbGFuIG9uDQpqdXN0IGFkZGluZyB0aGlzIHRvIDMuNC4gVGhlcmUg aXMgbm8gcG9pbnQgaW4gZm9vdC1kcmFnZ2luZyBvbiB0aGlzIGFueQ0KbW9yZS4NCg0KVHJvbmQN Cg0KPiBPbiBGZWIgMSwgMjAxMiwgYXQgMjowMCBQTSwgV2VzdG9uIEFuZHJvcyBBZGFtc29uIHdy b3RlOg0KPiANCj4gPiANCj4gPiBTaWduZWQtb2ZmLWJ5OiBXZXN0b24gQW5kcm9zIEFkYW1zb24g PGRyb3NAbmV0YXBwLmNvbT4NCj4gPiAtLS0NCj4gPiBJIHdhcyBhbHJlY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tYWludGFpbmVyDQoNCk5l dEFwcA0KVHJvbmQuTXlrbGVidXN0QG5ldGFwcC5jb20NCnd3dy5uZXRhcHAuY29tDQoNCg== ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 2/2] NFS: add mount option 'v4.1' 2012-02-01 19:46 ` Myklebust, Trond @ 2012-02-01 19:48 ` Chuck Lever 2012-02-01 19:59 ` Myklebust, Trond 0 siblings, 1 reply; 16+ messages in thread From: Chuck Lever @ 2012-02-01 19:48 UTC (permalink / raw) To: Myklebust, Trond; +Cc: Adamson, Dros, linux-nfs@vger.kernel.org On Feb 1, 2012, at 2:46 PM, Myklebust, Trond wrote: > On Wed, 2012-02-01 at 14:17 -0500, Chuck Lever wrote: >> Hi- >> >> I think we should co-ordinate with Solaris on this administrative interface. Can we discuss in Santa Clara? > > Unless they have a strong argument for why this is a bad idea, I plan on > just adding this to 3.4. There is no point in foot-dragging on this any > more. No foot dragging. We just ask at the next convenient opportunity. I think they want to go with vers=41. > > Trond > >> On Feb 1, 2012, at 2:00 PM, Weston Andros Adamson wrote: >> >>> >>> Signed-off-by: Weston Andros Adamson <dros@netapp.com> >>> --- >>> I was already messing around with mountoptions and figured "why not". >>> It's been joked (?) that 4.1 really should have been NFSv5! >>> >>> fs/nfs/super.c | 8 +++++++- >>> 1 files changed, 7 insertions(+), 1 deletions(-) >>> >>> diff --git a/fs/nfs/super.c b/fs/nfs/super.c >>> index 50baca1..801b060 100644 >>> --- a/fs/nfs/super.c >>> +++ b/fs/nfs/super.c >>> @@ -80,7 +80,7 @@ enum { >>> Opt_cto, Opt_nocto, >>> Opt_ac, Opt_noac, >>> Opt_lock, Opt_nolock, >>> - Opt_v2, Opt_v3, Opt_v4, >>> + Opt_v2, Opt_v3, Opt_v4, Opt_v4_1, >>> Opt_udp, Opt_tcp, Opt_rdma, >>> Opt_acl, Opt_noacl, >>> Opt_rdirplus, Opt_nordirplus, >>> @@ -136,6 +136,7 @@ static const match_table_t nfs_mount_option_tokens = { >>> { Opt_v2, "v2" }, >>> { Opt_v3, "v3" }, >>> { Opt_v4, "v4" }, >>> + { Opt_v4_1, "v4.1" }, >>> { Opt_udp, "udp" }, >>> { Opt_tcp, "tcp" }, >>> { Opt_rdma, "rdma" }, >>> @@ -1172,6 +1173,11 @@ static int nfs_parse_mount_options(char *raw, >>> mnt->flags &= ~NFS_MOUNT_VER3; >>> mnt->version = 4; >>> break; >>> + case Opt_v4_1: >>> + mnt->flags &= ~NFS_MOUNT_VER3; >>> + mnt->version = 4; >>> + mnt->minorversion = 1; >>> + break; >>> case Opt_udp: >>> mnt->flags &= ~NFS_MOUNT_TCP; >>> mnt->nfs_server.protocol = XPRT_TRANSPORT_UDP; >>> -- >>> 1.7.4.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 >> > > -- > Trond Myklebust > Linux NFS client maintainer > > NetApp > Trond.Myklebust@netapp.com > www.netapp.com > -- Chuck Lever chuck[dot]lever[at]oracle[dot]com ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 2/2] NFS: add mount option 'v4.1' 2012-02-01 19:48 ` Chuck Lever @ 2012-02-01 19:59 ` Myklebust, Trond 2012-02-01 20:05 ` Chuck Lever 0 siblings, 1 reply; 16+ messages in thread From: Myklebust, Trond @ 2012-02-01 19:59 UTC (permalink / raw) To: Chuck Lever; +Cc: Adamson, Dros, linux-nfs@vger.kernel.org T24gV2VkLCAyMDEyLTAyLTAxIGF0IDE0OjQ4IC0wNTAwLCBDaHVjayBMZXZlciB3cm90ZToNCj4g T24gRmViIDEsIDIwMTIsIGF0IDI6NDYgUE0sIE15a2xlYnVzdCwgVHJvbmQgd3JvdGU6DQo+IA0K PiA+IE9uIFdlZCwgMjAxMi0wMi0wMSBhdCAxNDoxNyAtMDUwMCwgQ2h1Y2sgTGV2ZXIgd3JvdGU6 DQo+ID4+IEhpLQ0KPiA+PiANCj4gPj4gSSB0aGluayB3ZSBzaG91bGQgY28tb3JkaW5hdGUgd2l0 aCBTb2xhcmlzIG9uIHRoaXMgYWRtaW5pc3RyYXRpdmUgaW50ZXJmYWNlLiAgQ2FuIHdlIGRpc2N1 c3MgaW4gU2FudGEgQ2xhcmE/DQo+ID4gDQo+ID4gVW5sZXNzIHRoZXkgaGF2ZSBhIHN0cm9uZyBh cmd1bWVudCBmb3Igd2h5IHRoaXMgaXMgYSBiYWQgaWRlYSwgSSBwbGFuIG9uDQo+ID4ganVzdCBh ZGRpbmcgdGhpcyB0byAzLjQuIFRoZXJlIGlzIG5vIHBvaW50IGluIGZvb3QtZHJhZ2dpbmcgb24g dGhpcyBhbnkNCj4gPiBtb3JlLg0KPiANCj4gTm8gZm9vdCBkcmFnZ2luZy4gIFdlIGp1c3QgYXNr IGF0IHRoZSBuZXh0IGNvbnZlbmllbnQgb3Bwb3J0dW5pdHkuICBJIHRoaW5rIHRoZXkgd2FudCB0 byBnbyB3aXRoIHZlcnM9NDEuDQoNCiI0LjEiIGFsbG93cyBmb3IgZWFzaWVyIHZpc3VhbCBhbmQg YXV0b21hdGVkIHBhcnNpbmcgb2YgbWFqb3IgdnMgbWlub3INCnZlcnNpb24uIEluIDggeWVhcnMg ZnJvbSBub3csIEknZCBwcmVmZXIgdG8gc2VlICd2ZXJzPTQuMTAnIHJhdGhlciB0aGFuDQondmVy cz00MTAnDQoNCi0tIA0KVHJvbmQgTXlrbGVidXN0DQpMaW51eCBORlMgY2xpZW50IG1haW50YWlu ZXINCg0KTmV0QXBwDQpUcm9uZC5NeWtsZWJ1c3RAbmV0YXBwLmNvbQ0Kd3d3Lm5ldGFwcC5jb20N Cg0K ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 2/2] NFS: add mount option 'v4.1' 2012-02-01 19:59 ` Myklebust, Trond @ 2012-02-01 20:05 ` Chuck Lever 2012-02-01 20:25 ` Adamson, Dros 0 siblings, 1 reply; 16+ messages in thread From: Chuck Lever @ 2012-02-01 20:05 UTC (permalink / raw) To: Myklebust, Trond; +Cc: Adamson, Dros, linux-nfs@vger.kernel.org On Feb 1, 2012, at 2:59 PM, Myklebust, Trond wrote: > On Wed, 2012-02-01 at 14:48 -0500, Chuck Lever wrote: >> On Feb 1, 2012, at 2:46 PM, Myklebust, Trond wrote: >> >>> On Wed, 2012-02-01 at 14:17 -0500, Chuck Lever wrote: >>>> Hi- >>>> >>>> I think we should co-ordinate with Solaris on this administrative interface. Can we discuss in Santa Clara? >>> >>> Unless they have a strong argument for why this is a bad idea, I plan on >>> just adding this to 3.4. There is no point in foot-dragging on this any >>> more. >> >> No foot dragging. We just ask at the next convenient opportunity. I think they want to go with vers=41. > > "4.1" allows for easier visual and automated parsing of major vs minor > version. In 8 years from now, I'd prefer to see 'vers=4.10' rather than > 'vers=410' Fair enough, and I've made similar points to them in the past. But you should be having this conversation with the Solaris guys, not me. Can we have this discussion at Connectathon, when all interested parties will be in the room? That should still be enough time to allow you to submit this change for 3.4. (And by the way, you will probably need some adjustment to mount.nfs's string parsing logic as well). -- Chuck Lever chuck[dot]lever[at]oracle[dot]com ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 2/2] NFS: add mount option 'v4.1' 2012-02-01 20:05 ` Chuck Lever @ 2012-02-01 20:25 ` Adamson, Dros 0 siblings, 0 replies; 16+ messages in thread From: Adamson, Dros @ 2012-02-01 20:25 UTC (permalink / raw) To: Chuck Lever; +Cc: Myklebust, Trond, Adamson, Dros, linux-nfs@vger.kernel.org [-- Attachment #1: Type: text/plain, Size: 1363 bytes --] On Feb 1, 2012, at 3:05 PM, Chuck Lever wrote: > > On Feb 1, 2012, at 2:59 PM, Myklebust, Trond wrote: > >> On Wed, 2012-02-01 at 14:48 -0500, Chuck Lever wrote: >>> On Feb 1, 2012, at 2:46 PM, Myklebust, Trond wrote: >>> >>>> On Wed, 2012-02-01 at 14:17 -0500, Chuck Lever wrote: >>>>> Hi- >>>>> >>>>> I think we should co-ordinate with Solaris on this administrative interface. Can we discuss in Santa Clara? >>>> >>>> Unless they have a strong argument for why this is a bad idea, I plan on >>>> just adding this to 3.4. There is no point in foot-dragging on this any >>>> more. >>> >>> No foot dragging. We just ask at the next convenient opportunity. I think they want to go with vers=41. >> >> "4.1" allows for easier visual and automated parsing of major vs minor >> version. In 8 years from now, I'd prefer to see 'vers=4.10' rather than >> 'vers=410' > > Fair enough, and I've made similar points to them in the past. But you should be having this conversation with the Solaris guys, not me. Can we have this discussion at Connectathon, when all interested parties will be in the room? That should still be enough time to allow you to submit this change for 3.4. > > (And by the way, you will probably need some adjustment to mount.nfs's string parsing logic as well). Well, it "just worked" for me! -dros [-- Attachment #2: smime.p7s --] [-- Type: application/pkcs7-signature, Size: 1374 bytes --] ^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 1/2] NFS: dont allow minorversion= opt when vers != 4 @ 2012-02-01 19:06 Weston Andros Adamson 2012-02-01 22:44 ` Boaz Harrosh 0 siblings, 1 reply; 16+ messages in thread From: Weston Andros Adamson @ 2012-02-01 19:06 UTC (permalink / raw) To: Trond.Myklebust; +Cc: linux-nfs, Weston Andros Adamson Don't allow invalid 'vers' and 'minorversion' combinations in mount options, such as "vers=3,minorversion=1". Signed-off-by: Weston Andros Adamson <dros@netapp.com> --- %d -> %u for printing mnt->version. fs/nfs/super.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/fs/nfs/super.c b/fs/nfs/super.c index 8e210b2..b88e023 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c @@ -1519,6 +1519,9 @@ static int nfs_parse_mount_options(char *raw, if (!sloppy && invalid_option) return 0; + if (mnt->minorversion && mnt->version != 4) + goto out_minorversion_mismatch; + /* * verify that any proto=/mountproto= options match the address * familiies in the addr=/mountaddr= options. @@ -1552,6 +1555,10 @@ out_invalid_address: out_invalid_value: printk(KERN_INFO "NFS: bad mount option value specified: %s\n", p); return 0; +out_minorversion_mismatch: + printk(KERN_INFO "NFS: mount option vers=%u does not support " + "minorversion=%u\n", mnt->version, mnt->minorversion); + return 0; out_nomem: printk(KERN_INFO "NFS: not enough memory to parse option\n"); return 0; -- 1.7.4.4 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH 1/2] NFS: dont allow minorversion= opt when vers != 4 2012-02-01 19:06 [PATCH 1/2] NFS: dont allow minorversion= opt when vers != 4 Weston Andros Adamson @ 2012-02-01 22:44 ` Boaz Harrosh 2012-02-01 23:07 ` Adamson, Dros 0 siblings, 1 reply; 16+ messages in thread From: Boaz Harrosh @ 2012-02-01 22:44 UTC (permalink / raw) To: Weston Andros Adamson; +Cc: Trond.Myklebust, linux-nfs On 02/01/2012 09:06 PM, Weston Andros Adamson wrote: > Don't allow invalid 'vers' and 'minorversion' combinations in mount options, > such as "vers=3,minorversion=1". > Just my $0.017 I don't see the point in this. If vers==3 then minorversion is ignored, just like today. What kind of extra protection does it buy us? But maybe it's just me Thanks Boaz > Signed-off-by: Weston Andros Adamson <dros@netapp.com> > --- > %d -> %u for printing mnt->version. > > fs/nfs/super.c | 7 +++++++ > 1 files changed, 7 insertions(+), 0 deletions(-) > > diff --git a/fs/nfs/super.c b/fs/nfs/super.c > index 8e210b2..b88e023 100644 > --- a/fs/nfs/super.c > +++ b/fs/nfs/super.c > @@ -1519,6 +1519,9 @@ static int nfs_parse_mount_options(char *raw, > if (!sloppy && invalid_option) > return 0; > > + if (mnt->minorversion && mnt->version != 4) > + goto out_minorversion_mismatch; > + > /* > * verify that any proto=/mountproto= options match the address > * familiies in the addr=/mountaddr= options. > @@ -1552,6 +1555,10 @@ out_invalid_address: > out_invalid_value: > printk(KERN_INFO "NFS: bad mount option value specified: %s\n", p); > return 0; > +out_minorversion_mismatch: > + printk(KERN_INFO "NFS: mount option vers=%u does not support " > + "minorversion=%u\n", mnt->version, mnt->minorversion); > + return 0; > out_nomem: > printk(KERN_INFO "NFS: not enough memory to parse option\n"); > return 0; ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 1/2] NFS: dont allow minorversion= opt when vers != 4 2012-02-01 22:44 ` Boaz Harrosh @ 2012-02-01 23:07 ` Adamson, Dros 2012-02-02 13:51 ` Bryan Schumaker 0 siblings, 1 reply; 16+ messages in thread From: Adamson, Dros @ 2012-02-01 23:07 UTC (permalink / raw) To: Boaz Harrosh; +Cc: Myklebust, Trond, <linux-nfs@vger.kernel.org> [-- Attachment #1: Type: text/plain, Size: 2194 bytes --] On Feb 1, 2012, at 5:44 PM, Boaz Harrosh wrote: > On 02/01/2012 09:06 PM, Weston Andros Adamson wrote: >> Don't allow invalid 'vers' and 'minorversion' combinations in mount options, >> such as "vers=3,minorversion=1". >> > > Just my $0.017 I don't see the point in this. > > If vers==3 then minorversion is ignored, just like today. > What kind of extra protection does it buy us? No, minorversion is not ignored when vers=3. Try an invalid (v4) minorversion: $ sudo mount -t nfs -o vers=3,minorversion=2 server:/export /mnt mount.nfs: an incorrect mount option was specified $ dmesg | tail -1 [ 1734.758101] NFS: bad mount option value specified: minorversion=2 I can understand why this was never a priority, but I find it quite confusing when version=3,minorversion=1 succeeds -- I've fat-fingered that more than a few times, started running tests and only later realized my mistake. > > But maybe it's just me > I know it's not just me who's been confused by this in the past :) -dros > Thanks > Boaz > >> Signed-off-by: Weston Andros Adamson <dros@netapp.com> >> --- >> %d -> %u for printing mnt->version. >> >> fs/nfs/super.c | 7 +++++++ >> 1 files changed, 7 insertions(+), 0 deletions(-) >> >> diff --git a/fs/nfs/super.c b/fs/nfs/super.c >> index 8e210b2..b88e023 100644 >> --- a/fs/nfs/super.c >> +++ b/fs/nfs/super.c >> @@ -1519,6 +1519,9 @@ static int nfs_parse_mount_options(char *raw, >> if (!sloppy && invalid_option) >> return 0; >> >> + if (mnt->minorversion && mnt->version != 4) >> + goto out_minorversion_mismatch; >> + >> /* >> * verify that any proto=/mountproto= options match the address >> * familiies in the addr=/mountaddr= options. >> @@ -1552,6 +1555,10 @@ out_invalid_address: >> out_invalid_value: >> printk(KERN_INFO "NFS: bad mount option value specified: %s\n", p); >> return 0; >> +out_minorversion_mismatch: >> + printk(KERN_INFO "NFS: mount option vers=%u does not support " >> + "minorversion=%u\n", mnt->version, mnt->minorversion); >> + return 0; >> out_nomem: >> printk(KERN_INFO "NFS: not enough memory to parse option\n"); >> return 0; > [-- Attachment #2: smime.p7s --] [-- Type: application/pkcs7-signature, Size: 1374 bytes --] ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 1/2] NFS: dont allow minorversion= opt when vers != 4 2012-02-01 23:07 ` Adamson, Dros @ 2012-02-02 13:51 ` Bryan Schumaker 2012-02-02 17:03 ` Adamson, Dros 0 siblings, 1 reply; 16+ messages in thread From: Bryan Schumaker @ 2012-02-02 13:51 UTC (permalink / raw) To: Adamson, Dros Cc: Boaz Harrosh, Myklebust, Trond, <linux-nfs@vger.kernel.org> On 02/01/12 18:07, Adamson, Dros wrote: > On Feb 1, 2012, at 5:44 PM, Boaz Harrosh wrote: > >> On 02/01/2012 09:06 PM, Weston Andros Adamson wrote: >>> Don't allow invalid 'vers' and 'minorversion' combinations in mount options, >>> such as "vers=3,minorversion=1". >>> >> >> Just my $0.017 I don't see the point in this. >> >> If vers==3 then minorversion is ignored, just like today. >> What kind of extra protection does it buy us? > > No, minorversion is not ignored when vers=3. But after mounting, does setting vers=3, minorversion=1 cause any change in NFS v3 behavior? - Bryan > > Try an invalid (v4) minorversion: > > $ sudo mount -t nfs -o vers=3,minorversion=2 server:/export /mnt > mount.nfs: an incorrect mount option was specified > $ dmesg | tail -1 > [ 1734.758101] NFS: bad mount option value specified: minorversion=2 > > I can understand why this was never a priority, but I find it quite confusing when version=3,minorversion=1 succeeds -- I've fat-fingered that more than a few times, started running tests and only later realized my mistake. > >> >> But maybe it's just me >> > > I know it's not just me who's been confused by this in the past :) > > -dros > >> Thanks >> Boaz >> >>> Signed-off-by: Weston Andros Adamson <dros@netapp.com> >>> --- >>> %d -> %u for printing mnt->version. >>> >>> fs/nfs/super.c | 7 +++++++ >>> 1 files changed, 7 insertions(+), 0 deletions(-) >>> >>> diff --git a/fs/nfs/super.c b/fs/nfs/super.c >>> index 8e210b2..b88e023 100644 >>> --- a/fs/nfs/super.c >>> +++ b/fs/nfs/super.c >>> @@ -1519,6 +1519,9 @@ static int nfs_parse_mount_options(char *raw, >>> if (!sloppy && invalid_option) >>> return 0; >>> >>> + if (mnt->minorversion && mnt->version != 4) >>> + goto out_minorversion_mismatch; >>> + >>> /* >>> * verify that any proto=/mountproto= options match the address >>> * familiies in the addr=/mountaddr= options. >>> @@ -1552,6 +1555,10 @@ out_invalid_address: >>> out_invalid_value: >>> printk(KERN_INFO "NFS: bad mount option value specified: %s\n", p); >>> return 0; >>> +out_minorversion_mismatch: >>> + printk(KERN_INFO "NFS: mount option vers=%u does not support " >>> + "minorversion=%u\n", mnt->version, mnt->minorversion); >>> + return 0; >>> out_nomem: >>> printk(KERN_INFO "NFS: not enough memory to parse option\n"); >>> return 0; >> > ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 1/2] NFS: dont allow minorversion= opt when vers != 4 2012-02-02 13:51 ` Bryan Schumaker @ 2012-02-02 17:03 ` Adamson, Dros 2012-02-02 19:00 ` Bryan Schumaker 0 siblings, 1 reply; 16+ messages in thread From: Adamson, Dros @ 2012-02-02 17:03 UTC (permalink / raw) To: Schumaker, Bryan Cc: Adamson, Dros, Boaz Harrosh, Myklebust, Trond, <linux-nfs@vger.kernel.org> [-- Attachment #1: Type: text/plain, Size: 1085 bytes --] On Feb 2, 2012, at 8:51 AM, Bryan Schumaker wrote: > On 02/01/12 18:07, Adamson, Dros wrote: > >> On Feb 1, 2012, at 5:44 PM, Boaz Harrosh wrote: >> >>> On 02/01/2012 09:06 PM, Weston Andros Adamson wrote: >>>> Don't allow invalid 'vers' and 'minorversion' combinations in mount options, >>>> such as "vers=3,minorversion=1". >>>> >>> >>> Just my $0.017 I don't see the point in this. >>> >>> If vers==3 then minorversion is ignored, just like today. >>> What kind of extra protection does it buy us? >> >> No, minorversion is not ignored when vers=3. > > > But after mounting, does setting vers=3, minorversion=1 cause any change in NFS v3 behavior? > No it doesn't. Past the parsing of options, minorversion is ignored for versions other than 4. I just don't understand how anyone can have problem with this patch. Why would we want to validate minorversion in some cases, but not all cases? How would this patch be a bad thing? It's about usability -- if this can confuse NFS developers, how are end users going to handle it? -dros [-- Attachment #2: smime.p7s --] [-- Type: application/pkcs7-signature, Size: 1374 bytes --] ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 1/2] NFS: dont allow minorversion= opt when vers != 4 2012-02-02 17:03 ` Adamson, Dros @ 2012-02-02 19:00 ` Bryan Schumaker 2012-02-02 20:14 ` Adamson, Dros 0 siblings, 1 reply; 16+ messages in thread From: Bryan Schumaker @ 2012-02-02 19:00 UTC (permalink / raw) To: Adamson, Dros Cc: Schumaker, Bryan, Boaz Harrosh, Myklebust, Trond, <linux-nfs@vger.kernel.org> On 02/02/12 12:03, Adamson, Dros wrote: > > On Feb 2, 2012, at 8:51 AM, Bryan Schumaker wrote: > >> On 02/01/12 18:07, Adamson, Dros wrote: >> >>> On Feb 1, 2012, at 5:44 PM, Boaz Harrosh wrote: >>> >>>> On 02/01/2012 09:06 PM, Weston Andros Adamson wrote: >>>>> Don't allow invalid 'vers' and 'minorversion' combinations in mount options, >>>>> such as "vers=3,minorversion=1". >>>>> >>>> >>>> Just my $0.017 I don't see the point in this. >>>> >>>> If vers==3 then minorversion is ignored, just like today. >>>> What kind of extra protection does it buy us? >>> >>> No, minorversion is not ignored when vers=3. >> >> >> But after mounting, does setting vers=3, minorversion=1 cause any change in NFS v3 behavior? >> > > No it doesn't. Past the parsing of options, minorversion is ignored for versions other than 4. > > I just don't understand how anyone can have problem with this patch. Why would we want to validate minorversion in some cases, but not all cases? How would this patch be a bad thing? > I don't have a problem with the patch, it makes sense that we shouldn't confuse developers or users. I was just curious if there was a spot where we had "if minor_version == 1: do_something()" without checking for major_version == 4. - Bryan > It's about usability -- if this can confuse NFS developers, how are end users going to handle it? > > -dros ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 1/2] NFS: dont allow minorversion= opt when vers != 4 2012-02-02 19:00 ` Bryan Schumaker @ 2012-02-02 20:14 ` Adamson, Dros 0 siblings, 0 replies; 16+ messages in thread From: Adamson, Dros @ 2012-02-02 20:14 UTC (permalink / raw) To: Schumaker, Bryan Cc: Adamson, Dros, Schumaker, Bryan, Boaz Harrosh, Myklebust, Trond, <linux-nfs@vger.kernel.org> [-- Attachment #1: Type: text/plain, Size: 2304 bytes --] On Feb 2, 2012, at 2:00 PM, Bryan Schumaker wrote: > On 02/02/12 12:03, Adamson, Dros wrote: > >> >> On Feb 2, 2012, at 8:51 AM, Bryan Schumaker wrote: >> >>> On 02/01/12 18:07, Adamson, Dros wrote: >>> >>>> On Feb 1, 2012, at 5:44 PM, Boaz Harrosh wrote: >>>> >>>>> On 02/01/2012 09:06 PM, Weston Andros Adamson wrote: >>>>>> Don't allow invalid 'vers' and 'minorversion' combinations in mount options, >>>>>> such as "vers=3,minorversion=1". >>>>>> >>>>> >>>>> Just my $0.017 I don't see the point in this. >>>>> >>>>> If vers==3 then minorversion is ignored, just like today. >>>>> What kind of extra protection does it buy us? >>>> >>>> No, minorversion is not ignored when vers=3. >>> >>> >>> But after mounting, does setting vers=3, minorversion=1 cause any change in NFS v3 behavior? >>> >> >> No it doesn't. Past the parsing of options, minorversion is ignored for versions other than 4. >> >> I just don't understand how anyone can have problem with this patch. Why would we want to validate minorversion in some cases, but not all cases? How would this patch be a bad thing? >> > > I don't have a problem with the patch, it makes sense that we shouldn't confuse developers or users. I was just curious if there was a spot where we had "if minor_version == 1: do_something()" without checking for major_version == 4. > Ah, I misunderstood… Versions != 4 pass the nfs_parsed_mount_data struct to nfs_create_server(), which completely ignores the minorversion member. Version == 4 passes the nfs_parsed_mount_data struct to nfs4_create_server(), which (through nfs4_init_server()) uses the minorversion member. So, having a set minorversion when mounting vers != 4 has no effect on how the NFS module operates. This is Boaz's argument for why the patch isn't needed. I understand that reasoning, but this is a user experience enhancement and I think they are important too. This patch only addresses an inconsistency in mount option validation. This doesn't change anything at the protocol level. I should have done a better job explaining this in the original post! -dros > - Bryan > >> It's about usability -- if this can confuse NFS developers, how are end users going to handle it? >> >> -dros > > [-- Attachment #2: smime.p7s --] [-- Type: application/pkcs7-signature, Size: 1374 bytes --] ^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2012-02-02 20:15 UTC | newest] Thread overview: 16+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-02-01 19:00 [PATCH 1/2] NFS: dont allow minorversion= opt when vers != 4 Weston Andros Adamson 2012-02-01 19:00 ` [PATCH 2/2] NFS: add mount option 'v4.1' Weston Andros Adamson 2012-02-01 19:17 ` Chuck Lever 2012-02-01 19:38 ` Adamson, Dros 2012-02-01 19:46 ` Myklebust, Trond 2012-02-01 19:48 ` Chuck Lever 2012-02-01 19:59 ` Myklebust, Trond 2012-02-01 20:05 ` Chuck Lever 2012-02-01 20:25 ` Adamson, Dros -- strict thread matches above, loose matches on Subject: below -- 2012-02-01 19:06 [PATCH 1/2] NFS: dont allow minorversion= opt when vers != 4 Weston Andros Adamson 2012-02-01 22:44 ` Boaz Harrosh 2012-02-01 23:07 ` Adamson, Dros 2012-02-02 13:51 ` Bryan Schumaker 2012-02-02 17:03 ` Adamson, Dros 2012-02-02 19:00 ` Bryan Schumaker 2012-02-02 20:14 ` Adamson, Dros
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).