On 7 May 2024, at 15:59, Olga Kornievskaia wrote: > From: Olga Kornievskaia <kolga@xxxxxxxxxx> > > Before doing the IO, check that we have the layout covering the range of > IO. > > Signed-off-by: Olga Kornievskaia <kolga@xxxxxxxxxx> > --- > fs/nfs/filelayout/filelayout.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/fs/nfs/filelayout/filelayout.c b/fs/nfs/filelayout/filelayout.c > index 85d2dc9bc212..bf3ba2e98f33 100644 > --- a/fs/nfs/filelayout/filelayout.c > +++ b/fs/nfs/filelayout/filelayout.c > @@ -868,6 +868,7 @@ filelayout_pg_init_read(struct nfs_pageio_descriptor *pgio, > struct nfs_page *req) > { > pnfs_generic_pg_check_layout(pgio); > + pnfs_generic_pg_check_range(pgio, req); > if (!pgio->pg_lseg) { > pgio->pg_lseg = fl_pnfs_update_layout(pgio->pg_inode, > nfs_req_openctx(req), > @@ -892,6 +893,7 @@ filelayout_pg_init_write(struct nfs_pageio_descriptor *pgio, > struct nfs_page *req) > { > pnfs_generic_pg_check_layout(pgio); > + pnfs_generic_pg_check_range(pgio, req); > if (!pgio->pg_lseg) { > pgio->pg_lseg = fl_pnfs_update_layout(pgio->pg_inode, > nfs_req_openctx(req), > -- > 2.39.1 Looks right, less duplication to just call pnfs_generic_pg_check_range() from pnfs_generic_pg_check_layout() now. Reviewed-by: Benjamin Coddington <bcodding@xxxxxxxxxx> Ben