Skip to content

Commit 464b424

Browse files
amschuma-ntapTrond Myklebust
authored andcommitted
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 <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
1 parent 9c75576 commit 464b424

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

fs/nfs/filelayout/filelayout.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -871,8 +871,8 @@ filelayout_pg_init_read(struct nfs_pageio_descriptor *pgio,
871871
if (!pgio->pg_lseg) {
872872
pgio->pg_lseg = fl_pnfs_update_layout(pgio->pg_inode,
873873
nfs_req_openctx(req),
874-
0,
875-
NFS4_MAX_UINT64,
874+
req_offset(req),
875+
req->wb_bytes,
876876
IOMODE_READ,
877877
false,
878878
GFP_KERNEL);
@@ -895,8 +895,8 @@ filelayout_pg_init_write(struct nfs_pageio_descriptor *pgio,
895895
if (!pgio->pg_lseg) {
896896
pgio->pg_lseg = fl_pnfs_update_layout(pgio->pg_inode,
897897
nfs_req_openctx(req),
898-
0,
899-
NFS4_MAX_UINT64,
898+
req_offset(req),
899+
req->wb_bytes,
900900
IOMODE_RW,
901901
false,
902902
GFP_NOFS);

0 commit comments

Comments
 (0)