summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJeff Layton <jlayton@kernel.org>2026-01-13 21:37:39 +0300
committerChuck Lever <chuck.lever@oracle.com>2026-03-30 04:25:09 +0300
commit55b6dd54c3bcb6edf7ad630a4510759f4b0cf1cd (patch)
treec42bfac33debbb14aadfdaf1147d2ea466d0ec62 /include
parent7aaa8047eafd0bd628065b15757d9b48c5f9c07d (diff)
downloadlinux-55b6dd54c3bcb6edf7ad630a4510759f4b0cf1cd.tar.xz
nfsd/sunrpc: add svc_rqst->rq_private pointer and remove rq_lease_breaker
rq_lease_breaker has always been a NFSv4 specific layering violation in svc_rqst. The reason it's there though is that we need a place that is thread-local, and accessible from the svc_rqst pointer. Add a new rq_private pointer to struct svc_rqst. This is intended for use by the threads that are handling the service. sunrpc code doesn't touch it. In nfsd, define a new struct nfsd_thread_local_info. nfsd declares one of these on the stack and puts a pointer to it in rq_private. Add a new ntli_lease_breaker field to the new struct and convert all of the places that access rq_lease_breaker to use the new field instead. Signed-off-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: Benjamin Coddington <bcodding@hammerspace.com> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/sunrpc/svc.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h
index 4dc14c7a711b..ab8237ba9596 100644
--- a/include/linux/sunrpc/svc.h
+++ b/include/linux/sunrpc/svc.h
@@ -175,6 +175,9 @@ static inline unsigned long svc_serv_maxpages(const struct svc_serv *serv)
/*
* The context of a single thread, including the request currently being
* processed.
+ *
+ * RPC programs are free to use rq_private to stash thread-local information.
+ * The sunrpc layer will not access it.
*/
struct svc_rqst {
struct list_head rq_all; /* all threads list */
@@ -251,7 +254,7 @@ struct svc_rqst {
unsigned long bc_to_initval;
unsigned int bc_to_retries;
unsigned int rq_status_counter; /* RPC processing counter */
- void **rq_lease_breaker; /* The v4 client breaking a lease */
+ void *rq_private; /* For use by the service thread */
};
/* bits for rq_flags */