* [RFC PATCH] NFSD: Add a Kconfig setting to enable delegated timestamps
@ 2025-03-12 3:06 cel
2025-03-12 10:01 ` Jeff Layton
0 siblings, 1 reply; 2+ messages in thread
From: cel @ 2025-03-12 3:06 UTC (permalink / raw)
To: Neil Brown, Jeff Layton, Olga Kornievskaia, Dai Ngo, Tom Talpey
Cc: linux-nfs, Chuck Lever
From: Chuck Lever <chuck.lever@oracle.com>
After three tries, we still see test failures with delegated
timestamps. Disable them by default, but leave the implementation
intact so that development can continue.
X-Cc: stable@vger.kernel.org # v6.14
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
fs/nfsd/Kconfig | 12 +++++++++++-
fs/nfsd/nfs4state.c | 16 ++++++++++++++--
2 files changed, 25 insertions(+), 3 deletions(-)
This compiles. Initial testing shows that tests that were previously
failing are now passing. I would like to include this in v6.15, but
I will give it a little more time in nfsd-testing.
diff --git a/fs/nfsd/Kconfig b/fs/nfsd/Kconfig
index c0bd1509ccd4..792d3fed1b45 100644
--- a/fs/nfsd/Kconfig
+++ b/fs/nfsd/Kconfig
@@ -172,6 +172,16 @@ config NFSD_LEGACY_CLIENT_TRACKING
recoverydir, or spawn a process directly using a usermodehelper
upcall.
- These legacy client tracking methods have proven to be probelmatic
+ These legacy client tracking methods have proven to be problematic
and will be removed in the future. Say Y here if you need support
for them in the interim.
+
+config NFSD_V4_DELEG_TIMESTAMPS
+ bool "Support delegated timestamps"
+ depends on NFSD_V4
+ default n
+ help
+ NFSD implements delegated timestamps according to
+ draft-ietf-nfsv4-delstid-08 "Extending the Opening of Files". This
+ is currently an experimental feature and is therefore left disabled
+ by default.
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 2da700635955..2bd63594d8da 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -5948,11 +5948,23 @@ nfsd4_verify_setuid_write(struct nfsd4_open *open, struct nfsd_file *nf)
return 0;
}
+#ifdef CONFIG_NFSD_V4_DELEG_TIMESTAMPS
+static bool nfsd4_want_deleg_timestamps(const struct nfsd4_open *open)
+{
+ return open->op_deleg_want & OPEN4_SHARE_ACCESS_WANT_DELEG_TIMESTAMPS;
+}
+#else /* CONFIG_NFSD_V4_DELEG_TIMESTAMPS */
+static bool nfsd4_want_deleg_timestamps(const struct nfsd4_open *open)
+{
+ return false;
+}
+#endif /* CONFIG NFSD_V4_DELEG_TIMESTAMPS */
+
static struct nfs4_delegation *
nfs4_set_delegation(struct nfsd4_open *open, struct nfs4_ol_stateid *stp,
struct svc_fh *parent)
{
- bool deleg_ts = open->op_deleg_want & OPEN4_SHARE_ACCESS_WANT_DELEG_TIMESTAMPS;
+ bool deleg_ts = nfsd4_want_deleg_timestamps(open);
struct nfs4_client *clp = stp->st_stid.sc_client;
struct nfs4_file *fp = stp->st_stid.sc_file;
struct nfs4_clnt_odstate *odstate = stp->st_clnt_odstate;
@@ -6193,8 +6205,8 @@ nfs4_open_delegation(struct svc_rqst *rqstp, struct nfsd4_open *open,
struct nfs4_ol_stateid *stp, struct svc_fh *currentfh,
struct svc_fh *fh)
{
- bool deleg_ts = open->op_deleg_want & OPEN4_SHARE_ACCESS_WANT_DELEG_TIMESTAMPS;
struct nfs4_openowner *oo = openowner(stp->st_stateowner);
+ bool deleg_ts = nfsd4_want_deleg_timestamps(open);
struct nfs4_client *clp = stp->st_stid.sc_client;
struct svc_fh *parent = NULL;
struct nfs4_delegation *dp;
--
2.48.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [RFC PATCH] NFSD: Add a Kconfig setting to enable delegated timestamps
2025-03-12 3:06 [RFC PATCH] NFSD: Add a Kconfig setting to enable delegated timestamps cel
@ 2025-03-12 10:01 ` Jeff Layton
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Layton @ 2025-03-12 10:01 UTC (permalink / raw)
To: cel, Neil Brown, Olga Kornievskaia, Dai Ngo, Tom Talpey
Cc: linux-nfs, Chuck Lever
On Tue, 2025-03-11 at 23:06 -0400, cel@kernel.org wrote:
> From: Chuck Lever <chuck.lever@oracle.com>
>
> After three tries, we still see test failures with delegated
> timestamps. Disable them by default, but leave the implementation
> intact so that development can continue.
>
> X-Cc: stable@vger.kernel.org # v6.14
> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
> ---
> fs/nfsd/Kconfig | 12 +++++++++++-
> fs/nfsd/nfs4state.c | 16 ++++++++++++++--
> 2 files changed, 25 insertions(+), 3 deletions(-)
>
> This compiles. Initial testing shows that tests that were previously
> failing are now passing. I would like to include this in v6.15, but
> I will give it a little more time in nfsd-testing.
>
> diff --git a/fs/nfsd/Kconfig b/fs/nfsd/Kconfig
> index c0bd1509ccd4..792d3fed1b45 100644
> --- a/fs/nfsd/Kconfig
> +++ b/fs/nfsd/Kconfig
> @@ -172,6 +172,16 @@ config NFSD_LEGACY_CLIENT_TRACKING
> recoverydir, or spawn a process directly using a usermodehelper
> upcall.
>
> - These legacy client tracking methods have proven to be probelmatic
> + These legacy client tracking methods have proven to be problematic
> and will be removed in the future. Say Y here if you need support
> for them in the interim.
> +
> +config NFSD_V4_DELEG_TIMESTAMPS
> + bool "Support delegated timestamps"
> + depends on NFSD_V4
> + default n
> + help
> + NFSD implements delegated timestamps according to
> + draft-ietf-nfsv4-delstid-08 "Extending the Opening of Files". This
> + is currently an experimental feature and is therefore left disabled
> + by default.
> diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
> index 2da700635955..2bd63594d8da 100644
> --- a/fs/nfsd/nfs4state.c
> +++ b/fs/nfsd/nfs4state.c
> @@ -5948,11 +5948,23 @@ nfsd4_verify_setuid_write(struct nfsd4_open *open, struct nfsd_file *nf)
> return 0;
> }
>
> +#ifdef CONFIG_NFSD_V4_DELEG_TIMESTAMPS
> +static bool nfsd4_want_deleg_timestamps(const struct nfsd4_open *open)
> +{
> + return open->op_deleg_want & OPEN4_SHARE_ACCESS_WANT_DELEG_TIMESTAMPS;
> +}
> +#else /* CONFIG_NFSD_V4_DELEG_TIMESTAMPS */
> +static bool nfsd4_want_deleg_timestamps(const struct nfsd4_open *open)
> +{
> + return false;
> +}
> +#endif /* CONFIG NFSD_V4_DELEG_TIMESTAMPS */
> +
> static struct nfs4_delegation *
> nfs4_set_delegation(struct nfsd4_open *open, struct nfs4_ol_stateid *stp,
> struct svc_fh *parent)
> {
> - bool deleg_ts = open->op_deleg_want & OPEN4_SHARE_ACCESS_WANT_DELEG_TIMESTAMPS;
> + bool deleg_ts = nfsd4_want_deleg_timestamps(open);
> struct nfs4_client *clp = stp->st_stid.sc_client;
> struct nfs4_file *fp = stp->st_stid.sc_file;
> struct nfs4_clnt_odstate *odstate = stp->st_clnt_odstate;
> @@ -6193,8 +6205,8 @@ nfs4_open_delegation(struct svc_rqst *rqstp, struct nfsd4_open *open,
> struct nfs4_ol_stateid *stp, struct svc_fh *currentfh,
> struct svc_fh *fh)
> {
> - bool deleg_ts = open->op_deleg_want & OPEN4_SHARE_ACCESS_WANT_DELEG_TIMESTAMPS;
> struct nfs4_openowner *oo = openowner(stp->st_stateowner);
> + bool deleg_ts = nfsd4_want_deleg_timestamps(open);
> struct nfs4_client *clp = stp->st_stid.sc_client;
> struct svc_fh *parent = NULL;
> struct nfs4_delegation *dp;
Thanks for doing this, Chuck.
Reviewed-by: Jeff Layton <jlayton@kernel.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-03-12 10:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-12 3:06 [RFC PATCH] NFSD: Add a Kconfig setting to enable delegated timestamps cel
2025-03-12 10:01 ` Jeff Layton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox