Skip to content

Commit cbd7be4

Browse files
author
Trond Myklebust
committed
pNFS/flexfiles: Specify the layout segment range in LAYOUTGET
Move from requesting only 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, but we will no longer error out if it does not. Signed-off-by: Trond Myklebust <[email protected]>
1 parent e70430d commit cbd7be4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

fs/nfs/flexfilelayout/flexfilelayout.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -798,8 +798,8 @@ ff_layout_pg_get_read(struct nfs_pageio_descriptor *pgio,
798798
pnfs_put_lseg(pgio->pg_lseg);
799799
pgio->pg_lseg = pnfs_update_layout(pgio->pg_inode,
800800
nfs_req_openctx(req),
801-
0,
802-
NFS4_MAX_UINT64,
801+
req_offset(req),
802+
req->wb_bytes,
803803
IOMODE_READ,
804804
strict_iomode,
805805
GFP_KERNEL);
@@ -891,8 +891,8 @@ ff_layout_pg_init_write(struct nfs_pageio_descriptor *pgio,
891891
if (!pgio->pg_lseg) {
892892
pgio->pg_lseg = pnfs_update_layout(pgio->pg_inode,
893893
nfs_req_openctx(req),
894-
0,
895-
NFS4_MAX_UINT64,
894+
req_offset(req),
895+
req->wb_bytes,
896896
IOMODE_RW,
897897
false,
898898
GFP_NOFS);

0 commit comments

Comments
 (0)