summaryrefslogtreecommitdiff
path: root/include/linux/nfs4.h
diff options
context:
space:
mode:
authorDai Ngo <dai.ngo@oracle.com>2022-11-17 06:44:47 +0300
committerChuck Lever <cel@kernel.org>2022-12-10 19:01:12 +0300
commit44df6f439a1790a5f602e3842879efa88f346672 (patch)
tree3f4ba612d056614685d124774a1174eff37177e9 /include/linux/nfs4.h
parent3959066b697b5dfbb7141124ae9665337d4bc638 (diff)
downloadlinux-44df6f439a1790a5f602e3842879efa88f346672.tar.xz
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.h13
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