Date: Mon, 27 Jul 2026 14:18:13 +0000 From: Rick Macklem <rmacklem@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 6901cbbd5a2c - main - nfs_commonkrpc.c: Handle NFSERR_DELAY for Sequence correctly Message-ID: <6a6768a5.40820.29856e2e@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=6901cbbd5a2c00d378a7f87426b36d6ee6ce0aa2 commit 6901cbbd5a2c00d378a7f87426b36d6ee6ce0aa2 Author: Rick Macklem <rmacklem@FreeBSD.org> AuthorDate: 2026-07-27 14:16:29 +0000 Commit: Rick Macklem <rmacklem@FreeBSD.org> CommitDate: 2026-07-27 14:16:29 +0000 nfs_commonkrpc.c: Handle NFSERR_DELAY for Sequence correctly Unlike RFC5661 (the original NFSv4.1 RFC), RFC8881 specifies that a NFS4ERR_DELAY reply to the SEQUENCE operation requires a reply using the same slot/sequence#. This patch fixes handling of this case, so it conforms to RFC8881. Reported by: J. David (j.david.lists@gmail.com) Tested by: J. David (j.david.lists@gmail.com) MFC after: 1 week --- sys/fs/nfs/nfs_commonkrpc.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/sys/fs/nfs/nfs_commonkrpc.c b/sys/fs/nfs/nfs_commonkrpc.c index f30ae7cbffa2..dd189a4aa909 100644 --- a/sys/fs/nfs/nfs_commonkrpc.c +++ b/sys/fs/nfs/nfs_commonkrpc.c @@ -1145,7 +1145,20 @@ tryagain: if ((nmp != NULL && i == NFSV4OP_SEQUENCE && j != 0) || (clp != NULL && i == NFSV4OP_CBSEQUENCE && j != 0)) { NFSCL_DEBUG(1, "failed seq=%d\n", j); - if (sep != NULL && i == NFSV4OP_SEQUENCE && + KASSERT(slot == -1, ("newnfs_request: slot not" + " -1")); + /* + * RFC8881 (unlike RFC5661) specifies that a + * NFSERR_DELAY reply to SEQUENCE is handled + * by a retry with same slot/sequence#. + * (Although not explicit, I will assume this + * applies to CB_SEQUENCE as well.) + */ + if (j == NFSERR_DELAY) { + nd->nd_repstat = + NFSERR_RETRYUNCACHEDREP; + } else if (sep != NULL && + i == NFSV4OP_SEQUENCE && j == NFSERR_SEQMISORDERED) { mtx_lock(&sep->nfsess_mtx); sep->nfsess_badslots |=home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a6768a5.40820.29856e2e>
