diff options
author | Tigran Mkrtchyan <tigran.mkrtchyan@desy.de> | 2017-04-04 15:12:51 +0200 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2017-04-20 13:35:24 -0400 |
commit | a7878ca140084ec267ede48fce64d7e60f6d873e (patch) | |
tree | f8ab86ac2154e049a0685d5ad5ebfc093f189d89 /fs/nfs/flexfilelayout | |
parent | b044f64513843e960f4b8d8e2e042abca1b7c029 (diff) | |
download | linux-a7878ca140084ec267ede48fce64d7e60f6d873e.tar.bz2 |
nfs: flexfilelayout: remove v3-only data server limitation
Flexfilelayout supports data servers which talk NFS v3 and v4.{0,1,2}.
However, this code path is disabled and v3 only servers are accepted.
This change removes this limitation.
Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs/flexfilelayout')
-rw-r--r-- | fs/nfs/flexfilelayout/flexfilelayoutdev.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/nfs/flexfilelayout/flexfilelayoutdev.c b/fs/nfs/flexfilelayout/flexfilelayoutdev.c index 457cfeb1d5c1..8ca9cc665561 100644 --- a/fs/nfs/flexfilelayout/flexfilelayoutdev.c +++ b/fs/nfs/flexfilelayout/flexfilelayoutdev.c @@ -119,7 +119,13 @@ 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) { + /* + * check for valid major/minor combination. + * currently we support dataserver which talk: + * v3, v4.0, v4.1, v4.2 + */ + if (!((ds_versions[i].version == 3 && ds_versions[i].minor_version == 0) || + (ds_versions[i].version == 4 && ds_versions[i].minor_version < 3))) { dprintk("%s: [%d] unsupported ds version %d-%d\n", __func__, i, ds_versions[i].version, ds_versions[i].minor_version); |