Linux NFS development
 help / color / mirror / Atom feed
From: Trond Myklebust <trondmy@kernel.org>
To: Jonathan Curley <jcurley@purestorage.com>,
	Anna Schumaker <anna@kernel.org>
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH 1/1] NFSv4/flexfiles: Fix layout merge mirror check.
Date: Mon, 08 Sep 2025 14:36:54 -0400	[thread overview]
Message-ID: <7f02383974ed3342c7a7df34b3044820145ff679.camel@kernel.org> (raw)
In-Reply-To: <20250908173516.1178411-2-jcurley@purestorage.com>

On Mon, 2025-09-08 at 17:35 +0000, Jonathan Curley wrote:
> 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>
> ---
>  fs/nfs/flexfilelayout/flexfilelayout.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/nfs/flexfilelayout/flexfilelayout.c
> b/fs/nfs/flexfilelayout/flexfilelayout.c
> index 6d9aea16ef44..addf4357610e 100644
> --- a/fs/nfs/flexfilelayout/flexfilelayout.c
> +++ b/fs/nfs/flexfilelayout/flexfilelayout.c
> @@ -334,7 +334,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)

D'oh! Well spotted... That definitely deserves a fixes tag.

Thanks!
  Trond

-- 
Trond Myklebust
Linux NFS client maintainer, Hammerspace
trondmy@kernel.org, trond.myklebust@hammerspace.com

      reply	other threads:[~2025-09-08 18:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-08 17:35 [PATCH 0/1] NFSv4/flexfiles: Fix layout merge mirror check Jonathan Curley
2025-09-08 17:35 ` [PATCH 1/1] " Jonathan Curley
2025-09-08 18:36   ` Trond Myklebust [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7f02383974ed3342c7a7df34b3044820145ff679.camel@kernel.org \
    --to=trondmy@kernel.org \
    --cc=anna@kernel.org \
    --cc=jcurley@purestorage.com \
    --cc=linux-nfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox