diff mbox series

[for-6.11,09/29] NFS: Manage boot verifier correctly in the case of localio

Message ID 20240607142646.20924-10-snitzer@kernel.org (mailing list archive)
State New
Headers show
Series nfs/nfsd: add support for localio bypass | expand

Commit Message

Mike Snitzer June 7, 2024, 2:26 p.m. UTC
From: Trond Myklebust <trond.myklebust@hammerspace.com>

If there is a localio error, we want to manage the boot verifier in
a similar fashion to how it is done on the server.

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
---
 fs/nfs/client.c           | 3 +++
 include/linux/nfs_fs_sb.h | 4 ++++
 2 files changed, 7 insertions(+)
diff mbox series

Patch

diff --git a/fs/nfs/client.c b/fs/nfs/client.c
index de77848ae654..dd3278dcfca8 100644
--- a/fs/nfs/client.c
+++ b/fs/nfs/client.c
@@ -178,6 +178,9 @@  struct nfs_client *nfs_alloc_client(const struct nfs_client_initdata *cl_init)
 	clp->cl_max_connect = cl_init->max_connect ? cl_init->max_connect : 1;
 	clp->cl_net = get_net(cl_init->net);
 
+	seqlock_init(&clp->cl_boot_lock);
+	ktime_get_real_ts64(&clp->cl_nfssvc_boot);
+
 	clp->cl_principal = "*";
 	clp->cl_xprtsec = cl_init->xprtsec;
 	return clp;
diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h
index 92de074e63b9..82a6f66fe1d0 100644
--- a/include/linux/nfs_fs_sb.h
+++ b/include/linux/nfs_fs_sb.h
@@ -125,6 +125,10 @@  struct nfs_client {
 	struct net		*cl_net;
 	struct list_head	pending_cb_stateids;
 	struct rcu_head		rcu;
+
+	/* localio */
+	struct timespec64	cl_nfssvc_boot;
+	seqlock_t		cl_boot_lock;
 };
 
 /*