summaryrefslogtreecommitdiff
path: root/fs/nfs/flexfilelayout
diff options
context:
space:
mode:
authorAnna Schumaker <Anna.Schumaker@Netapp.com>2022-06-17 23:23:36 +0300
committerTrond Myklebust <trond.myklebust@hammerspace.com>2022-07-12 17:53:10 +0300
commit940261a195080cf1cdcd56948d363fe363b69da1 (patch)
tree4708d6c668cefb7859f4215338b9ae5edc04cbef /fs/nfs/flexfilelayout
parentf1bafa7375c01ff71fb7cb97c06caadfcfe815f3 (diff)
downloadlinux-940261a195080cf1cdcd56948d363fe363b69da1.tar.xz
NFS: Allow setting rsize / wsize to a multiple of PAGE_SIZE
Previously, we required this to value to be a power of 2 for UDP related reasons. This patch keeps the power of 2 rule for UDP but allows more flexibility for TCP and RDMA. Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'fs/nfs/flexfilelayout')
-rw-r--r--fs/nfs/flexfilelayout/flexfilelayoutdev.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/nfs/flexfilelayout/flexfilelayoutdev.c b/fs/nfs/flexfilelayout/flexfilelayoutdev.c
index bfa7202ca7be..e028f5a0ef5f 100644
--- a/fs/nfs/flexfilelayout/flexfilelayoutdev.c
+++ b/fs/nfs/flexfilelayout/flexfilelayoutdev.c
@@ -113,8 +113,10 @@ nfs4_ff_alloc_deviceid_node(struct nfs_server *server, struct pnfs_device *pdev,
goto out_err_drain_dsaddrs;
ds_versions[i].version = be32_to_cpup(p++);
ds_versions[i].minor_version = be32_to_cpup(p++);
- ds_versions[i].rsize = nfs_block_size(be32_to_cpup(p++), NULL);
- ds_versions[i].wsize = nfs_block_size(be32_to_cpup(p++), NULL);
+ ds_versions[i].rsize = nfs_io_size(be32_to_cpup(p++),
+ server->nfs_client->cl_proto);
+ ds_versions[i].wsize = nfs_io_size(be32_to_cpup(p++),
+ server->nfs_client->cl_proto);
ds_versions[i].tightly_coupled = be32_to_cpup(p);
if (ds_versions[i].rsize > NFS_MAX_FILE_IO_SIZE)