diff options
author | Dai Ngo <dai.ngo@oracle.com> | 2022-11-16 19:44:47 -0800 |
---|---|---|
committer | Chuck Lever <cel@kernel.org> | 2022-12-10 11:01:12 -0500 |
commit | 44df6f439a1790a5f602e3842879efa88f346672 (patch) | |
tree | 3f4ba612d056614685d124774a1174eff37177e9 /include/linux/nfs4.h | |
parent | 3959066b697b5dfbb7141124ae9665337d4bc638 (diff) | |
download | lwn-44df6f439a1790a5f602e3842879efa88f346672.tar.gz lwn-44df6f439a1790a5f602e3842879efa88f346672.zip |
NFSD: add delegation reaper to react to low memory condition
The delegation reaper is called by nfsd memory shrinker's on
the 'count' callback. It scans the client list and sends the
courtesy CB_RECALL_ANY to the clients that hold delegations.
To avoid flooding the clients with CB_RECALL_ANY requests, the
delegation reaper sends only one CB_RECALL_ANY request to each
client per 5 seconds.
Signed-off-by: Dai Ngo <dai.ngo@oracle.com>
[ cel: moved definition of RCA4_TYPE_MASK_RDATA_DLG ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'include/linux/nfs4.h')
-rw-r--r-- | include/linux/nfs4.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/nfs4.h b/include/linux/nfs4.h index 8d04b6a5964c..730003c4f4af 100644 --- a/include/linux/nfs4.h +++ b/include/linux/nfs4.h @@ -732,4 +732,17 @@ enum nfs4_setxattr_options { SETXATTR4_CREATE = 1, SETXATTR4_REPLACE = 2, }; + +enum { + RCA4_TYPE_MASK_RDATA_DLG = 0, + RCA4_TYPE_MASK_WDATA_DLG = 1, + RCA4_TYPE_MASK_DIR_DLG = 2, + RCA4_TYPE_MASK_FILE_LAYOUT = 3, + RCA4_TYPE_MASK_BLK_LAYOUT = 4, + RCA4_TYPE_MASK_OBJ_LAYOUT_MIN = 8, + RCA4_TYPE_MASK_OBJ_LAYOUT_MAX = 9, + RCA4_TYPE_MASK_OTHER_LAYOUT_MIN = 12, + RCA4_TYPE_MASK_OTHER_LAYOUT_MAX = 15, +}; + #endif |