summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2026-01-07 08:27:13 +0100
committerAnna Schumaker <anna.schumaker@oracle.com>2026-01-20 14:49:47 -0500
commit0ebe655bd033fd84e312980c9eba199604631e7e (patch)
tree36ad0b5e3fae57cabd3f5a9dad112b1ee7fd0ced /include
parent85e056332840ec4a938cf7a082d8922533b3b169 (diff)
NFS: add a separate delegation return list
Searching for returnable delegations in the per-server delegations list can be very expensive. While commit e04bbf6b1bbe ("NFS: Avoid quadratic search when freeing delegations.") reduced the overhead a bit, the fact that all the non-returnable delegations have to be searched limits the amount of optimizations that can be done. Fix this by introducing a separate list that only contains delegations scheduled for return. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/nfs_fs_sb.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h
index c58b870f31ee..e377b8c7086e 100644
--- a/include/linux/nfs_fs_sb.h
+++ b/include/linux/nfs_fs_sb.h
@@ -259,6 +259,8 @@ struct nfs_server {
struct list_head state_owners_lru;
struct list_head layouts;
struct list_head delegations;
+ spinlock_t delegations_lock;
+ struct list_head delegations_return;
atomic_long_t nr_active_delegations;
unsigned int delegation_hash_mask;
struct hlist_head *delegation_hash_table;
@@ -266,9 +268,8 @@ struct nfs_server {
struct list_head ss_src_copies;
unsigned long delegation_flags;
-#define NFS4SERV_DELEGRETURN (1)
-#define NFS4SERV_DELEGATION_EXPIRED (2)
-#define NFS4SERV_DELEGRETURN_DELAYED (3)
+#define NFS4SERV_DELEGATION_EXPIRED (1)
+#define NFS4SERV_DELEGRETURN_DELAYED (2)
unsigned long delegation_gen;
unsigned long mig_gen;
unsigned long mig_status;