pNFS/filelayout: Enable partial layout support
Subsystems (2)
Anna Schumaker
maintainercover pNFS/filelayout: Enable partial layout support
From: Anna Schumaker <[email protected]>
These patches are heavily based on Trond's patches from April 2020 that added partial layout support to the flexfile layout. As far as I can tell, the pieces are already there we just need to change the filelayout code to be okay with partial layouts.
Thanks,
Anna
Anna Schumaker (2):
pNFS/filelayout: Remove the whole file layout requirement pNFS/filelayout: Specify the layout segment range in LAYOUTGET
fs/nfs/filelayout/filelayout.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-)
Signature · 1 line
2.44.0
Anna Schumaker
maintainerPATCH 1/2 pNFS/filelayout: Remove the whole file layout requirement
From: Anna Schumaker <[email protected]>
Layout segments have been supported in pNFS for years, so remove the requirement that the server always sends whole file layouts.
--- fs/nfs/filelayout/filelayout.c | 8 -------- 1 file changed, 8 deletions(-)
fs/nfs/filelayout/filelayout.c +0 -8
@@ -605,14 +605,6 @@ filelayout_check_layout(struct pnfs_layout_hdr *lo,dprintk ("--> %s\n" , __func__); -/* FIXME: remove this check when layout segment support is added */ -if (lgr->range.offset !=0 || - lgr->range.length !=NFS4_MAX_UINT64 ) { -dprintk ("%s Only whole file layouts supported. Use MDS i/o\n" , - __func__); - goto out; - } -if (fl->pattern_offset > lgr->range.offset) {dprintk ("%s pattern_offset %lld too large\n" , __func__, fl->pattern_offset);
Signature · 1 line
2.44.0
Anna Schumaker
maintainerPATCH 2/2 pNFS/filelayout: Specify the layout segment range in LAYOUTGET
In reply to Anna SchumakerFrom: Anna Schumaker <[email protected]>
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.
--- fs/nfs/filelayout/filelayout.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
fs/nfs/filelayout/filelayout.c +4 -4
@@ -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 );
Signature · 1 line
2.44.0