FAILED: patch "[PATCH] NFSD: Remove NFSERR_EAGAIN" failed to apply to 5.15-stable tree
Subsystems (4)
[email protected]
maintainerThe patch below does not apply to the 5.15-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.15.y
git checkout FETCH_HEAD
git cherry-pick -x c6c209ceb87f64a6ceebe61761951dcbbf4a0baa
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026011223-capitol-diploma-75b9@gregkh' --subject-prefix 'PATCH 5.15.y' HEAD^..
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From c6c209ceb87f64a6ceebe61761951dcbbf4a0baa Mon Sep 17 00:00:00 2001
From: Chuck Lever <[email protected]>
Date: Tue, 9 Dec 2025 19:28:49 -0500
Subject: [PATCH] NFSD: Remove NFSERR_EAGAIN
I haven't found an NFSERR_EAGAIN in RFCs 1094, 1813, 7530, or 8881. None of these RFCs have an NFS status code that match the numeric value "11".
Based on the meaning of the EAGAIN errno, I presume the use of this status in NFSD means NFS4ERR_DELAY. So replace the one usage of nfserr_eagain, and remove it from NFSD's NFS status conversion tables.
As far as I can tell, NFSERR_EAGAIN has existed since the pre-git era, but was not actually used by any code until commit f4e44b393389 ("NFSD: delay unmount source's export after inter-server copy completed."), at which time it become possible for NFSD to return a status code of 11 (which is not valid NFS protocol).
fs/nfs_common/common.c +0 -1
@@ -17,7 +17,6 @@ static const struct { { NFSERR_NOENT, -ENOENT }, { NFSERR_IO, -EIO }, { NFSERR_NXIO, -ENXIO }, -/* { NFSERR_EAGAIN, -EAGAIN }, */ { NFSERR_ACCES, -EACCES }, { NFSERR_EXIST, -EEXIST }, { NFSERR_XDEV, -EXDEV },
fs/nfsd/nfs4proc.c +1 -1
@@ -1506,7 +1506,7 @@ static __be32 nfsd4_ssc_setup_dul(struct nfsd_net *nn, char *ipaddr, (schedule_timeout(20*HZ) == 0)) {finish_wait (&nn->nfsd_ssc_waitq, &wait);kfree (work); -return nfserr_eagain; +return nfserr_jukebox; }finish_wait (&nn->nfsd_ssc_waitq, &wait); goto try_again;
fs/nfsd/nfsd.h +0 -1
@@ -233,7 +233,6 @@ void nfsd_lockd_shutdown(void);#define nfserr_noent cpu_to_be32(NFSERR_NOENT)#define nfserr_io cpu_to_be32(NFSERR_IO)#define nfserr_nxio cpu_to_be32(NFSERR_NXIO) -#define nfserr_eagain cpu_to_be32(NFSERR_EAGAIN)#define nfserr_acces cpu_to_be32(NFSERR_ACCES)#define nfserr_exist cpu_to_be32(NFSERR_EXIST)#define nfserr_xdev cpu_to_be32(NFSERR_XDEV)
include/trace/misc/nfs.h +0 -2
@@ -16,7 +16,6 @@ TRACE_DEFINE_ENUM(NFSERR_PERM);TRACE_DEFINE_ENUM (NFSERR_NOENT );TRACE_DEFINE_ENUM (NFSERR_IO );TRACE_DEFINE_ENUM (NFSERR_NXIO ); -TRACE_DEFINE_ENUM (NFSERR_EAGAIN );TRACE_DEFINE_ENUM (NFSERR_ACCES );TRACE_DEFINE_ENUM (NFSERR_EXIST );TRACE_DEFINE_ENUM (NFSERR_XDEV );
@@ -52,7 +51,6 @@ TRACE_DEFINE_ENUM(NFSERR_JUKEBOX); { NFSERR_NXIO, "NXIO" }, \ { ECHILD, "CHILD" }, \ { ETIMEDOUT, "TIMEDOUT" }, \ - { NFSERR_EAGAIN, "AGAIN" }, \ { NFSERR_ACCES, "ACCES" }, \ { NFSERR_EXIST, "EXIST" }, \ { NFSERR_XDEV, "XDEV" }, \
include/uapi/linux/nfs.h +0 -1
@@ -49,7 +49,6 @@NFSERR_NOENT =2 ,/* v2 v3 v4 */ NFSERR_IO =5 ,/* v2 v3 v4 */ NFSERR_NXIO =6 ,/* v2 v3 v4 */ -NFSERR_EAGAIN =11 ,/* v2 v3 */ NFSERR_ACCES =13 ,/* v2 v3 v4 */ NFSERR_EXIST =17 ,/* v2 v3 v4 */ NFSERR_XDEV = 18, /* v3 v4 */
Sasha Levin
maintainerPATCH 1/3 NFS: trace: show TIMEDOUT instead of 0x6e
From: Chen Hanxiao <[email protected]>
[ Upstream commit cef48236dfe55fa266d505e8a497963a7bc5ef2a ]
__nfs_revalidate_inode may return ETIMEDOUT.
print symbol of ETIMEDOUT in nfs trace:
before:
cat-5191 [005] 119.331127: nfs_revalidate_inode_exit: error=-110 (0x6e)
after:
cat-1738 [004] 44.365509: nfs_revalidate_inode_exit: error=-110 (TIMEDOUT)
Stable-dep-of: c6c209ceb87f ("NFSD: Remove NFSERR_EAGAIN")
--- include/trace/misc/nfs.h | 1 + 1 file changed, 1 insertion(+)
include/trace/misc/nfs.h +1 -0
@@ -52,6 +52,7 @@ TRACE_DEFINE_ENUM(NFSERR_JUKEBOX); { NFSERR_IO, "IO" }, \ { NFSERR_NXIO, "NXIO" }, \ { ECHILD, "CHILD" }, \ + { ETIMEDOUT, "TIMEDOUT" }, \ { NFSERR_EAGAIN, "AGAIN" }, \ { NFSERR_ACCES, "ACCES" }, \ { NFSERR_EXIST, "EXIST" }, \
Signature · 1 line
2.51.0
Sasha Levin
maintainerPATCH 2/3 nfs_common: factor out nfs_errtbl and nfs_stat_to_errno
From: Mike Snitzer <[email protected]>
[ Upstream commit 4806ded4c14c5e8fdc6ce885d83221a78c06a428 ]
Common nfs_stat_to_errno() is used by both fs/nfs/nfs2xdr.c and fs/nfs/nfs3xdr.c
Will also be used by fs/nfsd/localio.c
Stable-dep-of: c6c209ceb87f ("NFSD: Remove NFSERR_EAGAIN")
--- fs/nfs/Kconfig | 1 + fs/nfs/nfs2xdr.c | 70 +----------------------- fs/nfs/nfs3xdr.c | 108 +++++++------------------------------ fs/nfs/nfs4xdr.c | 4 +- fs/nfs_common/Makefile | 2 + fs/nfs_common/common.c | 67 +++++++++++++++++++++++ fs/nfsd/Kconfig | 1 + include/linux/nfs_common.h | 16 ++++++ 8 files changed, 109 insertions(+), 160 deletions(-) create mode 100644 fs/nfs_common/common.c create mode 100644 include/linux/nfs_common.h
fs/nfs/Kconfig +1 -0
@@ -5,6 +5,7 @@ config NFS_FS select CRC32 select LOCKD select SUNRPC + select NFS_COMMON select NFS_ACL_SUPPORT if NFS_V3_ACL help Choose Y here if you want to access files residing on other
fs/nfs/nfs2xdr.c +1 -69
93 lines not on this page · raw message
fs/nfs/nfs3xdr.c +20 -88
237 lines not on this page · raw message
fs/nfs/nfs4xdr.c +1 -3
@@ -52,6 +52,7 @@#include <linux/nfs.h> #include <linux/nfs4.h> #include <linux/nfs_fs.h> +#include <linux/nfs_common.h> #include "nfs4_fs.h" #include "nfs4trace.h"
@@ -63,9 +64,6 @@#define NFSDBG_FACILITY NFSDBG_XDR -/* Mapping from NFS error code to "errno" error code. */ -#define errno_NFSERR_IO EIO -struct compound_hdr ;static int nfs4_stat_to_errno (int ); static void encode_layoutget(struct xdr_stream *xdr,
fs/nfs_common/Makefile +2 -0
@@ -8,3 +8,5 @@ nfs_acl-objs := nfsacl.o obj-$(CONFIG_GRACE_PERIOD) += grace.o obj-$(CONFIG_NFS_V4_2_SSC_HELPER) += nfs_ssc.o + +obj-$(CONFIG_NFS_COMMON) += common.o
fs/nfs_common/common.c new file +67 -0
67 lines not on this page · raw message
fs/nfsd/Kconfig +1 -0
@@ -8,6 +8,7 @@ config NFSD select LOCKD select SUNRPC select EXPORTFS + select NFS_COMMON select NFS_ACL_SUPPORT if NFSD_V2_ACL select NFS_ACL_SUPPORT if NFSD_V3_ACL depends on MULTIUSER
include/linux/nfs_common.h new file +16 -0
@@ -0,0 +1,16 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* +* This file contains constants and methods used by both NFS client and server. +*/ +#ifndef _LINUX_NFS_COMMON_H +#define _LINUX_NFS_COMMON_H + +#include <linux/errno.h> +#include <uapi/linux/nfs.h> + +/* Mapping from NFS error code to "errno" error code. */ +#define errno_NFSERR_IO EIO + +int nfs_stat_to_errno (enum nfs_stat status); + +#endif /* _LINUX_NFS_COMMON_H */
Signature · 1 line
2.51.0
Sasha Levin
maintainerPATCH 3/3 NFSD: Remove NFSERR_EAGAIN
In reply to Sasha LevinFrom: Chuck Lever <[email protected]>
[ Upstream commit c6c209ceb87f64a6ceebe61761951dcbbf4a0baa ]
I haven't found an NFSERR_EAGAIN in RFCs 1094, 1813, 7530, or 8881. None of these RFCs have an NFS status code that match the numeric value "11".
Based on the meaning of the EAGAIN errno, I presume the use of this status in NFSD means NFS4ERR_DELAY. So replace the one usage of nfserr_eagain, and remove it from NFSD's NFS status conversion tables.
As far as I can tell, NFSERR_EAGAIN has existed since the pre-git era, but was not actually used by any code until commit f4e44b393389 ("NFSD: delay unmount source's export after inter-server copy completed."), at which time it become possible for NFSD to return a status code of 11 (which is not valid NFS protocol).
--- fs/nfs_common/common.c | 1 - fs/nfsd/nfs4proc.c | 2 +- fs/nfsd/nfsd.h | 1 - include/trace/misc/nfs.h | 2 -- include/uapi/linux/nfs.h | 1 - 5 files changed, 1 insertion(+), 6 deletions(-)
fs/nfs_common/common.c +0 -1
@@ -16,7 +16,6 @@ static const struct { { NFSERR_NOENT, -ENOENT }, { NFSERR_IO, -errno_NFSERR_IO}, { NFSERR_NXIO, -ENXIO }, -/* { NFSERR_EAGAIN, -EAGAIN }, */ { NFSERR_ACCES, -EACCES }, { NFSERR_EXIST, -EEXIST }, { NFSERR_XDEV, -EXDEV },
fs/nfsd/nfs4proc.c +1 -1
@@ -1322,7 +1322,7 @@ static __be32 nfsd4_ssc_setup_dul(struct nfsd_net *nn, char *ipaddr, (freezable_schedule_timeout(20*HZ) == 0)) {finish_wait (&nn->nfsd_ssc_waitq, &wait);kfree (work); -return nfserr_eagain; +return nfserr_jukebox; }finish_wait (&nn->nfsd_ssc_waitq, &wait); goto try_again;
fs/nfsd/nfsd.h +0 -1
@@ -201,7 +201,6 @@ void nfsd_lockd_shutdown(void);#define nfserr_noent cpu_to_be32(NFSERR_NOENT)#define nfserr_io cpu_to_be32(NFSERR_IO)#define nfserr_nxio cpu_to_be32(NFSERR_NXIO) -#define nfserr_eagain cpu_to_be32(NFSERR_EAGAIN)#define nfserr_acces cpu_to_be32(NFSERR_ACCES)#define nfserr_exist cpu_to_be32(NFSERR_EXIST)#define nfserr_xdev cpu_to_be32(NFSERR_XDEV)
include/trace/misc/nfs.h +0 -2
@@ -16,7 +16,6 @@ TRACE_DEFINE_ENUM(NFSERR_PERM);TRACE_DEFINE_ENUM (NFSERR_NOENT );TRACE_DEFINE_ENUM (NFSERR_IO );TRACE_DEFINE_ENUM (NFSERR_NXIO ); -TRACE_DEFINE_ENUM (NFSERR_EAGAIN );TRACE_DEFINE_ENUM (NFSERR_ACCES );TRACE_DEFINE_ENUM (NFSERR_EXIST );TRACE_DEFINE_ENUM (NFSERR_XDEV );
@@ -53,7 +52,6 @@ TRACE_DEFINE_ENUM(NFSERR_JUKEBOX); { NFSERR_NXIO, "NXIO" }, \ { ECHILD, "CHILD" }, \ { ETIMEDOUT, "TIMEDOUT" }, \ - { NFSERR_EAGAIN, "AGAIN" }, \ { NFSERR_ACCES, "ACCES" }, \ { NFSERR_EXIST, "EXIST" }, \ { NFSERR_XDEV, "XDEV" }, \
include/uapi/linux/nfs.h +0 -1
@@ -49,7 +49,6 @@NFSERR_NOENT =2 ,/* v2 v3 v4 */ NFSERR_IO =5 ,/* v2 v3 v4 */ NFSERR_NXIO =6 ,/* v2 v3 v4 */ -NFSERR_EAGAIN =11 ,/* v2 v3 */ NFSERR_ACCES =13 ,/* v2 v3 v4 */ NFSERR_EXIST =17 ,/* v2 v3 v4 */ NFSERR_XDEV = 18, /* v3 v4 */
Signature · 1 line
2.51.0