summaryrefslogtreecommitdiff
path: root/include/linux/nfs_fs_sb.h
diff options
context:
space:
mode:
authorBenjamin Coddington <bcodding@redhat.com>2023-08-24 21:52:19 +0300
committerTrond Myklebust <trond.myklebust@hammerspace.com>2023-11-01 22:15:52 +0300
commita9b8d90f87263f985fa14250fc8caf7bfcde8803 (patch)
tree89b811cc1eb48054d9e45a7ba0b3fe71bae29971 /include/linux/nfs_fs_sb.h
parent59464b262ff5b35840f1af77c52173dee9f4de31 (diff)
downloadlinux-a9b8d90f87263f985fa14250fc8caf7bfcde8803.tar.xz
NFSv4: fairly test all delegations on a SEQ4_ revocation
When the client is required to use TEST_STATEID to discover which delegation(s) have been revoked, it may continually test delegations at the head of the list if the server continues to be unsatisfied and send SEQ4_STATUS_RECALLABLE_STATE_REVOKED. For a large number of delegations this behavior is prone to live-lock because the client may never be able to test and free revoked state at the end of the list since the SEQ4_STATUS_RECALLABLE_STATE_REVOKED will cause us to flag delegations at the head of the list to be tested. This problem is further exacerbated by the state manager's willingness to be scheduled out on a busy system while testing the list of delegations. Keep a generation counter for each attempt to test all delegations, and skip delegations that have already been tested in the current pass. Signed-off-by: Benjamin Coddington <bcodding@redhat.com> Tested-by: Torkil Svensgaard <torkil@drcmr.dk> Tested-by: Ruben Vestergaard <rubenv@drcmr.dk> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'include/linux/nfs_fs_sb.h')
-rw-r--r--include/linux/nfs_fs_sb.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h
index cd628c4b011e..cd797e00fe35 100644
--- a/include/linux/nfs_fs_sb.h
+++ b/include/linux/nfs_fs_sb.h
@@ -239,6 +239,7 @@ struct nfs_server {
struct list_head delegations;
struct list_head ss_copies;
+ unsigned long delegation_gen;
unsigned long mig_gen;
unsigned long mig_status;
#define NFS_MIG_IN_TRANSITION (1)