diff options
author | Joel Becker <joel.becker@oracle.com> | 2010-01-29 20:19:06 -0500 |
---|---|---|
committer | Joel Becker <joel.becker@oracle.com> | 2010-02-26 18:41:17 -0500 |
commit | 553b5eb91abd5f8e679d23ae547b92c589726814 (patch) | |
tree | 99b3e550a11b0d62d45bbc78d73d448acadd138a /fs/ocfs2/stackglue.h | |
parent | e603cfb074e150736814ef093a411df32c02ba9f (diff) |
ocfs2: Pass the locking protocol into ocfs2_cluster_connect().
Inside the stackglue, the locking protocol structure is hanging off of
the ocfs2_cluster_connection. This takes it one further; the locking
protocol is passed into ocfs2_cluster_connect(). Now different cluster
connections can have different locking protocols with distinct asts.
Note that all locking protocols have to keep their maximum protocol
version in lock-step.
With the protocol structure set in ocfs2_cluster_connect(), there is no
need for the stackglue to have a static pointer to a specific protocol
structure. We can change initialization to only pass in the maximum
protocol version.
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Diffstat (limited to 'fs/ocfs2/stackglue.h')
-rw-r--r-- | fs/ocfs2/stackglue.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/ocfs2/stackglue.h b/fs/ocfs2/stackglue.h index 77a7a9aeba73..b1981ba4c91f 100644 --- a/fs/ocfs2/stackglue.h +++ b/fs/ocfs2/stackglue.h | |||
@@ -241,6 +241,7 @@ struct ocfs2_stack_plugin { | |||
241 | int ocfs2_cluster_connect(const char *stack_name, | 241 | int ocfs2_cluster_connect(const char *stack_name, |
242 | const char *group, | 242 | const char *group, |
243 | int grouplen, | 243 | int grouplen, |
244 | struct ocfs2_locking_protocol *lproto, | ||
244 | void (*recovery_handler)(int node_num, | 245 | void (*recovery_handler)(int node_num, |
245 | void *recovery_data), | 246 | void *recovery_data), |
246 | void *recovery_data, | 247 | void *recovery_data, |
@@ -270,7 +271,7 @@ int ocfs2_stack_supports_plocks(void); | |||
270 | int ocfs2_plock(struct ocfs2_cluster_connection *conn, u64 ino, | 271 | int ocfs2_plock(struct ocfs2_cluster_connection *conn, u64 ino, |
271 | struct file *file, int cmd, struct file_lock *fl); | 272 | struct file *file, int cmd, struct file_lock *fl); |
272 | 273 | ||
273 | void ocfs2_stack_glue_set_locking_protocol(struct ocfs2_locking_protocol *proto); | 274 | void ocfs2_stack_glue_set_max_proto_version(struct ocfs2_protocol_version *max_proto); |
274 | 275 | ||
275 | 276 | ||
276 | /* Used by stack plugins */ | 277 | /* Used by stack plugins */ |