summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorAnna Schumaker <Anna.Schumaker@Netapp.com>2024-03-21 00:11:20 +0300
committerTrond Myklebust <trond.myklebust@hammerspace.com>2024-05-20 18:06:18 +0300
commit464b424fb09b894f792a494f10539c190db503cf (patch)
tree1e183c016bdc6eacaf6d15a3492d497b8d710874 /fs
parent9c75576e3bbf0153e92ab51ff161962d8632c290 (diff)
downloadlinux-464b424fb09b894f792a494f10539c190db503cf.tar.xz
pNFS/filelayout: Specify the layout segment range in LAYOUTGET
Move from only requesting full file layout segments to requesting layout segments that match our I/O size. This means the server is still free to return a full file layout if it wants, but partial layouts will no longer cause an error. Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfs/filelayout/filelayout.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/nfs/filelayout/filelayout.c b/fs/nfs/filelayout/filelayout.c
index 3fb18b16a5b4..cc2ed4b5a4fd 100644
--- a/fs/nfs/filelayout/filelayout.c
+++ b/fs/nfs/filelayout/filelayout.c
@@ -871,8 +871,8 @@ filelayout_pg_init_read(struct nfs_pageio_descriptor *pgio,
if (!pgio->pg_lseg) {
pgio->pg_lseg = fl_pnfs_update_layout(pgio->pg_inode,
nfs_req_openctx(req),
- 0,
- NFS4_MAX_UINT64,
+ req_offset(req),
+ req->wb_bytes,
IOMODE_READ,
false,
GFP_KERNEL);
@@ -895,8 +895,8 @@ filelayout_pg_init_write(struct nfs_pageio_descriptor *pgio,
if (!pgio->pg_lseg) {
pgio->pg_lseg = fl_pnfs_update_layout(pgio->pg_inode,
nfs_req_openctx(req),
- 0,
- NFS4_MAX_UINT64,
+ req_offset(req),
+ req->wb_bytes,
IOMODE_RW,
false,
GFP_NOFS);