Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit 523412b

Browse files
olgakorn1Trond Myklebust
authored andcommitted
pNFS/filelayout: check layout segment range
Before doing the IO, check that we have the layout covering the range of IO. Signed-off-by: Olga Kornievskaia <kolga@netapp.com> Reviewed-by: Benjamin Coddington <bcodding@redhat.com> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
1 parent 3ebcb24 commit 523412b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

fs/nfs/filelayout/filelayout.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -868,6 +868,7 @@ filelayout_pg_init_read(struct nfs_pageio_descriptor *pgio,
868868
struct nfs_page *req)
869869
{
870870
pnfs_generic_pg_check_layout(pgio);
871+
pnfs_generic_pg_check_range(pgio, req);
871872
if (!pgio->pg_lseg) {
872873
pgio->pg_lseg = fl_pnfs_update_layout(pgio->pg_inode,
873874
nfs_req_openctx(req),
@@ -892,6 +893,7 @@ filelayout_pg_init_write(struct nfs_pageio_descriptor *pgio,
892893
struct nfs_page *req)
893894
{
894895
pnfs_generic_pg_check_layout(pgio);
896+
pnfs_generic_pg_check_range(pgio, req);
895897
if (!pgio->pg_lseg) {
896898
pgio->pg_lseg = fl_pnfs_update_layout(pgio->pg_inode,
897899
nfs_req_openctx(req),

0 commit comments

Comments
 (0)