aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/fs.h
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@citi.umich.edu>2007-09-06 12:34:25 -0400
committerJ. Bruce Fields <bfields@citi.umich.edu>2008-10-03 16:19:02 -0400
commitaf558e33bedab672f5cfd3260bce7445e353fe21 (patch)
treeeb89187b6c12640a00584bd35be035ba332e4af3 /include/linux/fs.h
parentd5b337b4877f7c4e1d761434ee04d045b0201e03 (diff)
nfsd: common grace period control
Rewrite grace period code to unify management of grace period across lockd and nfsd. The current code has lockd and nfsd cooperate to compute a grace period which is satisfactory to them both, and then individually enforce it. This creates a slight race condition, since the enforcement is not coordinated. It's also more complicated than necessary. Here instead we have lockd and nfsd each inform common code when they enter the grace period, and when they're ready to leave the grace period, and allow normal locking only after both of them are ready to leave. We also expect the locks_start_grace()/locks_end_grace() interface here to be simpler to build on for future cluster/high-availability work, which may require (for example) putting individual filesystems into grace, or enforcing grace periods across multiple cluster nodes. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r--include/linux/fs.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 9f540165a078..27cfa723b92a 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -942,6 +942,14 @@ struct lock_manager_operations {
942 int (*fl_change)(struct file_lock **, int); 942 int (*fl_change)(struct file_lock **, int);
943}; 943};
944 944
945struct lock_manager {
946 struct list_head list;
947};
948
949void locks_start_grace(struct lock_manager *);
950void locks_end_grace(struct lock_manager *);
951int locks_in_grace(void);
952
945/* that will die - we need it for nfs_lock_info */ 953/* that will die - we need it for nfs_lock_info */
946#include <linux/nfs_fs_i.h> 954#include <linux/nfs_fs_i.h>
947 955