summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorJonathan Curley <jcurley@purestorage.com>2025-09-08 17:35:16 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-10-02 13:39:00 +0200
commit5f756d1866ebb374e61a0030d7209221c7c4e98f (patch)
treeef59657b449443354bca5d1680e09f39c1aec23b /fs
parent9a38cd92493c2e7a89379f6e1c248c3766cf731a (diff)
downloadlinux-5f756d1866ebb374e61a0030d7209221c7c4e98f.tar.gz
linux-5f756d1866ebb374e61a0030d7209221c7c4e98f.tar.bz2
linux-5f756d1866ebb374e61a0030d7209221c7c4e98f.zip
NFSv4/flexfiles: Fix layout merge mirror check.
[ Upstream commit dd2fa82473453661d12723c46c9f43d9876a7efd ] Typo in ff_lseg_match_mirrors makes the diff ineffective. This results in merge happening all the time. Merge happening all the time is problematic because it marks lsegs invalid. Marking lsegs invalid causes all outstanding IO to get restarted with EAGAIN and connections to get closed. Closing connections constantly triggers race conditions in the RDMA implementation... Fixes: 660d1eb22301c ("pNFS/flexfile: Don't merge layout segments if the mirrors don't match") Signed-off-by: Jonathan Curley <jcurley@purestorage.com> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfs/flexfilelayout/flexfilelayout.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/flexfilelayout/flexfilelayout.c b/fs/nfs/flexfilelayout/flexfilelayout.c
index 798e2e32b3fb..24d97d7ba12d 100644
--- a/fs/nfs/flexfilelayout/flexfilelayout.c
+++ b/fs/nfs/flexfilelayout/flexfilelayout.c
@@ -270,7 +270,7 @@ ff_lseg_match_mirrors(struct pnfs_layout_segment *l1,
struct pnfs_layout_segment *l2)
{
const struct nfs4_ff_layout_segment *fl1 = FF_LAYOUT_LSEG(l1);
- const struct nfs4_ff_layout_segment *fl2 = FF_LAYOUT_LSEG(l1);
+ const struct nfs4_ff_layout_segment *fl2 = FF_LAYOUT_LSEG(l2);
u32 i;
if (fl1->mirror_array_cnt != fl2->mirror_array_cnt)