From d44e0fc704143624b3e88fbf8fbcfda7a83fd299 Mon Sep 17 00:00:00 2001 From: David Teigland Date: Tue, 18 Mar 2008 14:22:11 -0500 Subject: dlm: recover nodes that are removed and re-added If a node is removed from a lockspace, and then added back before the dlm is notified of the removal, the dlm will not detect the removal and won't clear the old state from the node. This is fixed by using a list of added nodes so the membership recovery can detect when a newly added node is already in the member list. Signed-off-by: David Teigland --- fs/dlm/dlm_internal.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'fs/dlm/dlm_internal.h') diff --git a/fs/dlm/dlm_internal.h b/fs/dlm/dlm_internal.h index d30ea8b433a2..c70c8e58358f 100644 --- a/fs/dlm/dlm_internal.h +++ b/fs/dlm/dlm_internal.h @@ -133,8 +133,10 @@ struct dlm_member { struct dlm_recover { struct list_head list; - int *nodeids; + int *nodeids; /* nodeids of all members */ int node_count; + int *new; /* nodeids of new members */ + int new_count; uint64_t seq; }; -- cgit v1.2.3 From 2402211a8389282fd2942fad4511f02c0eeeffc5 Mon Sep 17 00:00:00 2001 From: David Teigland Date: Fri, 14 Mar 2008 15:09:15 -0500 Subject: dlm: move plock code from gfs2 Move the code that handles cluster posix locks from gfs2 into the dlm so that it can be used by both gfs2 and ocfs2. Signed-off-by: David Teigland --- fs/dlm/dlm_internal.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'fs/dlm/dlm_internal.h') diff --git a/fs/dlm/dlm_internal.h b/fs/dlm/dlm_internal.h index c70c8e58358f..caa1581e158f 100644 --- a/fs/dlm/dlm_internal.h +++ b/fs/dlm/dlm_internal.h @@ -582,6 +582,8 @@ static inline int dlm_no_directory(struct dlm_ls *ls) int dlm_netlink_init(void); void dlm_netlink_exit(void); void dlm_timeout_warn(struct dlm_lkb *lkb); +int dlm_plock_init(void); +void dlm_plock_exit(void); #ifdef CONFIG_DLM_DEBUG int dlm_register_debugfs(void); -- cgit v1.2.3 From 3d564fa3472d36cd6aa70514c37b8bbbec5b17ab Mon Sep 17 00:00:00 2001 From: David Teigland Date: Mon, 14 Apr 2008 14:06:29 -0500 Subject: dlm: common max length definitions Add central definitions for max lockspace name length and max resource name length. The lack of central definitions has resulted in scattered private definitions which we can now clean up, including an unused one in dlm_device.h. Signed-off-by: David Teigland --- fs/dlm/dlm_internal.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'fs/dlm/dlm_internal.h') diff --git a/fs/dlm/dlm_internal.h b/fs/dlm/dlm_internal.h index caa1581e158f..73c36f501707 100644 --- a/fs/dlm/dlm_internal.h +++ b/fs/dlm/dlm_internal.h @@ -43,8 +43,6 @@ #include #include "config.h" -#define DLM_LOCKSPACE_LEN 64 - /* Size of the temp buffer midcomms allocates on the stack. We try to make this large enough so most messages fit. FIXME: should sctp make this unnecessary? */ -- cgit v1.2.3