All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@kernel.org>
To: daejun7.park@samsung.com, Chuck Lever <cel@kernel.org>,
	NeilBrown <neil@brown.name>,
	Olga Kornievskaia <okorniev@redhat.com>,
	Dai Ngo <Dai.Ngo@oracle.com>, Tom Talpey <tom@talpey.com>
Cc: Christoph Hellwig <hch@lst.de>,
	Benjamin Coddington <bcodding@redhat.com>,
	 Trond Myklebust <trondmy@kernel.org>,
	Anna Schumaker <anna@kernel.org>,
	linux-nfs@vger.kernel.org,  linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 5/7] nfsd: keep polling a layout recall answered with NFS4ERR_OLD_STATEID
Date: Wed, 14 Oct 2026 07:25:21 -0400	[thread overview]
Message-ID: <574bebd564ccb710cb5217998fdda5588361d12d.camel@kernel.org> (raw)
In-Reply-To: <4616c5cefcad5ff4dd660f9db69a9962fddd28ef.camel@kernel.org>

On Wed, 2026-10-14 at 07:06 -0400, Jeff Layton wrote:
> On Wed, 2026-10-14 at 16:30 +0900, Daejun Park via B4 Relay wrote:
> > From: Daejun Park <daejun7.park@samsung.com>
> > 
> > When a client answers CB_LAYOUTRECALL with NFS4_OK and still holds
> > layouts, nfsd4_cb_layout_done() sends the callback again after 10 ms to
> > see if the client is done. The repeat carries the stateid of the first
> > callback, although RFC 8881 section 12.5.3 has the server increment the
> > seqid in each CB_LAYOUTRECALL request.
> > 
> > The same section makes the seqid of a processed CB_LAYOUTRECALL the
> > current seqid of the client. Since commit dce72920c81b ("NFSv4.1: if
> > referring calls are complete, trust the stateid argument"), which is in
> > v6.8, the Linux client answers a recall whose seqid is not newer than
> > its own with NFS4ERR_OLD_STATEID, unless a LAYOUTRETURN is on the wire
> > (NFS4ERR_DELAY) or the layouts are gone (NFS4ERR_NOMATCHING_LAYOUT).
> > Before that commit it answered a repeat of the recall it was working
> > on with NFS4_OK until its LAYOUTRETURN was prepared, and with
> > NFS4ERR_OLD_STATEID from then until nfsd had processed the LAYOUTRETURN
> > (read from the code, not run). So a client from v6.8 on that needs
> > more than 10 ms to finish its I/O and to send LAYOUTRETURN answers the
> > second callback with NFS4ERR_OLD_STATEID, and an older client can
> > answer a later one that way.
> > 
> 
> What eventually breaks this cycle? The client has a newer layout, so it
> returns NFS4ERR_OLD_STATEID to the CB_LAYOUTRECALL, and now the server
> is going to continually retransmit that request. What makes the server
> eventually give up?
> 
> Or am I misunderstanding what causes this?
> 
> 

Oh, I think I see. The next patch makes it retransmit the
CB_LAYOUTRECALL with a more up-to-date stateid. That should eventually
resolve itself, I think.

It would make sense to squash 5 and 6 together so we don't end up with
this endless cycle if this happens on a bisect.
-- 
Jeff Layton <jlayton@kernel.org>

  reply	other threads:[~2026-10-14 11:25 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-14  7:29 [PATCH v2 0/7] nfsd: layout recall and lease break fixes Daejun Park via B4 Relay
2026-10-14  7:29 ` Daejun Park
2026-10-14  7:29 ` [PATCH v2 1/7] nfsd: fail a LAYOUTGET in progress when the layout lease is broken Daejun Park via B4 Relay
2026-10-14  7:29   ` Daejun Park
2026-10-14  7:29 ` [PATCH v2 2/7] nfsd: answer NFS4ERR_DELAY instead of waiting for a layout recall Daejun Park via B4 Relay
2026-10-14  7:29   ` Daejun Park
2026-10-14  7:29 ` [PATCH v2 3/7] nfsd: make the time limit of a layout recall work Daejun Park via B4 Relay
2026-10-14  7:29   ` Daejun Park
2026-10-14  7:30 ` [PATCH v2 4/7] nfsd: run the fence script when a block layout lease break times out Daejun Park via B4 Relay
2026-10-14  7:30   ` Daejun Park
2026-10-14  7:30 ` [PATCH v2 5/7] nfsd: keep polling a layout recall answered with NFS4ERR_OLD_STATEID Daejun Park via B4 Relay
2026-10-14  7:30   ` Daejun Park
2026-10-14 11:06   ` Jeff Layton
2026-10-14 11:25     ` Jeff Layton [this message]
2026-10-14  7:30 ` [PATCH v2 6/7] nfsd: poll a layout recall with a new seqid when the client is past it Daejun Park via B4 Relay
2026-10-14  7:30   ` Daejun Park
2026-10-14  7:30 ` [PATCH v2 7/7] nfsd: do not fence a client for a layout recall with no layouts left Daejun Park via B4 Relay
2026-10-14  7:30   ` Daejun Park
2026-10-14 11:26 ` [PATCH v2 0/7] nfsd: layout recall and lease break fixes Jeff Layton

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=574bebd564ccb710cb5217998fdda5588361d12d.camel@kernel.org \
    --to=jlayton@kernel.org \
    --cc=Dai.Ngo@oracle.com \
    --cc=anna@kernel.org \
    --cc=bcodding@redhat.com \
    --cc=cel@kernel.org \
    --cc=daejun7.park@samsung.com \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=neil@brown.name \
    --cc=okorniev@redhat.com \
    --cc=tom@talpey.com \
    --cc=trondmy@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.