Commit 7cede02
committed
Merge: NFSv4: Allow FREE_STATEID to clean up delegations
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/7145
JIRA: https://issues.redhat.com/browse/RHEL-70625
commit 77be29b
Author: Benjamin Coddington <bcodding@redhat.com>
Date: Thu May 1 08:29:42 2025 -0400
NFSv4: Allow FREE_STATEID to clean up delegations
The NFS client's list of delegations can grow quite large (well beyond the
delegation watermark) if the server is revoking or there are repeated
events that expire state. Once this happens, the revoked delegations can
cause a performance problem for subsequent walks of the
servers->delegations list when the client tries to test and free state.
If we can determine that the FREE_STATEID operation has completed without
error, we can prune the delegation from the list.
Since the NFS client combines TEST_STATEID with FREE_STATEID in its minor
version operations, there isn't an easy way to communicate success of
FREE_STATEID. Rather than re-arrange quite a number of calling paths to
break out the separate procedures, let's signal the success of FREE_STATEID
by setting the stateid's type.
Set NFS4_FREED_STATEID_TYPE for stateids that have been successfully
discarded from the server, and use that type to signal that the delegation
can be cleaned up.
Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com>
Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
Approved-by: Olga Kornievskaia <okorniev@redhat.com>
Approved-by: Scott Mayhew <smayhew@redhat.com>
Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com>
Merged-by: Augusto Caringi <acaringi@redhat.com>4 files changed
+26
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
969 | 969 | | |
970 | 970 | | |
971 | 971 | | |
972 | | - | |
973 | | - | |
974 | | - | |
975 | | - | |
976 | | - | |
977 | | - | |
978 | | - | |
979 | 972 | | |
980 | 973 | | |
981 | 974 | | |
| |||
1012 | 1005 | | |
1013 | 1006 | | |
1014 | 1007 | | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
1015 | 1026 | | |
1016 | 1027 | | |
1017 | 1028 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
71 | | - | |
| 70 | + | |
72 | 71 | | |
73 | 72 | | |
74 | 73 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
| 108 | + | |
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| |||
2877 | 2877 | | |
2878 | 2878 | | |
2879 | 2879 | | |
2880 | | - | |
2881 | | - | |
| 2880 | + | |
2882 | 2881 | | |
2883 | 2882 | | |
2884 | 2883 | | |
2885 | 2884 | | |
2886 | 2885 | | |
2887 | 2886 | | |
2888 | | - | |
2889 | | - | |
| 2887 | + | |
2890 | 2888 | | |
2891 | 2889 | | |
2892 | 2890 | | |
| |||
2895 | 2893 | | |
2896 | 2894 | | |
2897 | 2895 | | |
| 2896 | + | |
2898 | 2897 | | |
2899 | 2898 | | |
2900 | 2899 | | |
| |||
10556 | 10555 | | |
10557 | 10556 | | |
10558 | 10557 | | |
10559 | | - | |
| 10558 | + | |
10560 | 10559 | | |
10561 | 10560 | | |
10562 | 10561 | | |
| |||
10596 | 10595 | | |
10597 | 10596 | | |
10598 | 10597 | | |
| 10598 | + | |
10599 | 10599 | | |
10600 | 10600 | | |
10601 | 10601 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| 73 | + | |
73 | 74 | | |
74 | 75 | | |
75 | 76 | | |
| |||
0 commit comments