From: Trond Myklebust Date: Thu, 18 Jun 2020 17:30:39 +0000 (-0400) Subject: pNFS/flexfiles: The mirror count could depend on the layout segment range X-Git-Tag: v5.10.7~1823^2~18 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=18eb87f4443a0a23757e8a1ce3b3fa03714702fd;p=platform%2Fkernel%2Flinux-rpi.git pNFS/flexfiles: The mirror count could depend on the layout segment range Make sure we specify the layout segment range when calculating the mirror count. In theory, that number could depend on the range to which we're writing. Signed-off-by: Trond Myklebust --- diff --git a/fs/nfs/flexfilelayout/flexfilelayout.c b/fs/nfs/flexfilelayout/flexfilelayout.c index b3ec12e..b26173d 100644 --- a/fs/nfs/flexfilelayout/flexfilelayout.c +++ b/fs/nfs/flexfilelayout/flexfilelayout.c @@ -947,8 +947,8 @@ ff_layout_pg_get_mirror_count_write(struct nfs_pageio_descriptor *pgio, if (!pgio->pg_lseg) { pgio->pg_lseg = 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);