Skip to content

Commit 26a8076

Browse files
committed
NFSD: Add a Kconfig setting to enable delegated timestamps
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. Cc: [email protected] # v6.14 Reviewed-by: Jeff Layton <[email protected]> Signed-off-by: Chuck Lever <[email protected]>
1 parent 87480a8 commit 26a8076

File tree

2 files changed

+25
-3
lines changed

2 files changed

+25
-3
lines changed

fs/nfsd/Kconfig

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,16 @@ config NFSD_LEGACY_CLIENT_TRACKING
172172
recoverydir, or spawn a process directly using a usermodehelper
173173
upcall.
174174

175-
These legacy client tracking methods have proven to be probelmatic
175+
These legacy client tracking methods have proven to be problematic
176176
and will be removed in the future. Say Y here if you need support
177177
for them in the interim.
178+
179+
config NFSD_V4_DELEG_TIMESTAMPS
180+
bool "Support delegated timestamps"
181+
depends on NFSD_V4
182+
default n
183+
help
184+
NFSD implements delegated timestamps according to
185+
draft-ietf-nfsv4-delstid-08 "Extending the Opening of Files". This
186+
is currently an experimental feature and is therefore left disabled
187+
by default.

fs/nfsd/nfs4state.c

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5956,11 +5956,23 @@ nfsd4_verify_setuid_write(struct nfsd4_open *open, struct nfsd_file *nf)
59565956
return 0;
59575957
}
59585958

5959+
#ifdef CONFIG_NFSD_V4_DELEG_TIMESTAMPS
5960+
static bool nfsd4_want_deleg_timestamps(const struct nfsd4_open *open)
5961+
{
5962+
return open->op_deleg_want & OPEN4_SHARE_ACCESS_WANT_DELEG_TIMESTAMPS;
5963+
}
5964+
#else /* CONFIG_NFSD_V4_DELEG_TIMESTAMPS */
5965+
static bool nfsd4_want_deleg_timestamps(const struct nfsd4_open *open)
5966+
{
5967+
return false;
5968+
}
5969+
#endif /* CONFIG NFSD_V4_DELEG_TIMESTAMPS */
5970+
59595971
static struct nfs4_delegation *
59605972
nfs4_set_delegation(struct nfsd4_open *open, struct nfs4_ol_stateid *stp,
59615973
struct svc_fh *parent)
59625974
{
5963-
bool deleg_ts = open->op_deleg_want & OPEN4_SHARE_ACCESS_WANT_DELEG_TIMESTAMPS;
5975+
bool deleg_ts = nfsd4_want_deleg_timestamps(open);
59645976
struct nfs4_client *clp = stp->st_stid.sc_client;
59655977
struct nfs4_file *fp = stp->st_stid.sc_file;
59665978
struct nfs4_clnt_odstate *odstate = stp->st_clnt_odstate;
@@ -6168,8 +6180,8 @@ static void
61686180
nfs4_open_delegation(struct nfsd4_open *open, struct nfs4_ol_stateid *stp,
61696181
struct svc_fh *currentfh)
61706182
{
6171-
bool deleg_ts = open->op_deleg_want & OPEN4_SHARE_ACCESS_WANT_DELEG_TIMESTAMPS;
61726183
struct nfs4_openowner *oo = openowner(stp->st_stateowner);
6184+
bool deleg_ts = nfsd4_want_deleg_timestamps(open);
61736185
struct nfs4_client *clp = stp->st_stid.sc_client;
61746186
struct svc_fh *parent = NULL;
61756187
struct nfs4_delegation *dp;

0 commit comments

Comments
 (0)