Skip to content

Commit 18eb87f

Browse files
author
Trond Myklebust
committed
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 <[email protected]>
1 parent f97ff92 commit 18eb87f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/nfs/flexfilelayout/flexfilelayout.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -947,8 +947,8 @@ ff_layout_pg_get_mirror_count_write(struct nfs_pageio_descriptor *pgio,
947947
if (!pgio->pg_lseg) {
948948
pgio->pg_lseg = pnfs_update_layout(pgio->pg_inode,
949949
nfs_req_openctx(req),
950-
0,
951-
NFS4_MAX_UINT64,
950+
req_offset(req),
951+
req->wb_bytes,
952952
IOMODE_RW,
953953
false,
954954
GFP_NOFS);

0 commit comments

Comments
 (0)