summaryrefslogtreecommitdiff
path: root/fs/lockd/procfs.h
diff options
context:
space:
mode:
authorJeff Layton <jlayton@primarydata.com>2014-09-13 00:40:20 +0400
committerJ. Bruce Fields <bfields@redhat.com>2014-09-18 00:33:13 +0400
commitd68e3c4aa416d592d79152a49af121e4ecb204e3 (patch)
tree055e7cf7fb69bc10f0b0238a87c05758ed125d61 /fs/lockd/procfs.h
parent3b3e7b72239a748f516d6aee8c12df48d50e2d7e (diff)
downloadlinux-d68e3c4aa416d592d79152a49af121e4ecb204e3.tar.xz
lockd: add a /proc/fs/lockd/nlm_end_grace file
Add a new procfile that will allow a (privileged) userland process to end the NLM grace period early. The basic idea here will be to have sm-notify write to this file, if it sent out no NOTIFY requests when it runs. In that situation, we can generally expect that there will be no reclaim requests so the grace period can be lifted early. Signed-off-by: Jeff Layton <jlayton@primarydata.com>
Diffstat (limited to 'fs/lockd/procfs.h')
-rw-r--r--fs/lockd/procfs.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/fs/lockd/procfs.h b/fs/lockd/procfs.h
new file mode 100644
index 000000000000..2257a1311027
--- /dev/null
+++ b/fs/lockd/procfs.h
@@ -0,0 +1,28 @@
+/*
+ * Procfs support for lockd
+ *
+ * Copyright (c) 2014 Jeff Layton <jlayton@primarydata.com>
+ */
+#ifndef _LOCKD_PROCFS_H
+#define _LOCKD_PROCFS_H
+
+#include <linux/kconfig.h>
+
+#if IS_ENABLED(CONFIG_PROC_FS)
+int lockd_create_procfs(void);
+void lockd_remove_procfs(void);
+#else
+static inline int
+lockd_create_procfs(void)
+{
+ return 0;
+}
+
+static inline void
+lockd_remove_procfs(void)
+{
+ return;
+}
+#endif /* IS_ENABLED(CONFIG_PROC_FS) */
+
+#endif /* _LOCKD_PROCFS_H */