Commit dd2fa824 authored by Jonathan Curley's avatar Jonathan Curley Committed by Trond Myklebust
Browse files

NFSv4/flexfiles: Fix layout merge mirror check.



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: 660d1eb2 ("pNFS/flexfile: Don't merge layout segments if the mirrors don't match")
Signed-off-by: default avatarJonathan Curley <jcurley@purestorage.com>
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
parent 9559d2ff
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -293,7 +293,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)