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>
This commit is contained in:

committed by
J. Bruce Fields

parent
3b3e7b7223
commit
d68e3c4aa4
28
fs/lockd/procfs.h
Normal file
28
fs/lockd/procfs.h
Normal file
@@ -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 */
|
Reference in New Issue
Block a user