Hey Tigran! > On Apr 3, 2017, at 8:10 AM, Tigran Mkrtchyan <tigran.mkrtchyan@xxxxxxx> wrote: > > Flexfilelayout supports data servers which talk NFS v3 and v4.{0,1}. > However, this code path is disabled and v3 only servers are accepted. > This change removes this limitation. > Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@xxxxxxx> > --- > fs/nfs/flexfilelayout/flexfilelayoutdev.c | 18 ++++++++++++------ > 1 file changed, 12 insertions(+), 6 deletions(-) > > diff --git a/fs/nfs/flexfilelayout/flexfilelayoutdev.c b/fs/nfs/flexfilelayout/flexfilelayoutdev.c > index 457cfeb..fac0ef2 100644 > --- a/fs/nfs/flexfilelayout/flexfilelayoutdev.c > +++ b/fs/nfs/flexfilelayout/flexfilelayoutdev.c > @@ -119,12 +119,18 @@ nfs4_ff_alloc_deviceid_node(struct nfs_server *server, struct pnfs_device *pdev, > if (ds_versions[i].wsize > NFS_MAX_FILE_IO_SIZE) > ds_versions[i].wsize = NFS_MAX_FILE_IO_SIZE; > > - if (ds_versions[i].version != 3 || ds_versions[i].minor_version != 0) { > - dprintk("%s: [%d] unsupported ds version %d-%d\n", __func__, > - i, ds_versions[i].version, > - ds_versions[i].minor_version); > - ret = -EPROTONOSUPPORT; > - goto out_err_drain_dsaddrs; > + /* check for valid major minor combination */ > + switch (ds_versions[i].version * 100 + ds_versions[i].minor_version) { I'm not sure I love this method of matching > + case 300: /* v3 */ > + case 400: /* v4.0 */ > + case 401: /* v4.1 */ > + break; v4.2? -dros > + default: > + dprintk("%s: [%d] unsupported ds version %d-%d\n", __func__, > + i, ds_versions[i].version, > + ds_versions[i].minor_version); > + ret = -EPROTONOSUPPORT; > + goto out_err_drain_dsaddrs; > } > > dprintk("%s: [%d] vers %u minor_ver %u rsize %u wsize %u coupled %d\n", > -- > 2.9.3 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-nfs" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html