Skip to content

Commit e603cfb

Browse files
author
Joel Becker
committed
ocfs2: Remove the ast pointers from ocfs2_stack_plugins
With the full ocfs2_locking_protocol hanging off of the ocfs2_cluster_connection, ast wrappers can get the ast/bast pointers there. They don't need to get them from their plugin structure. The user plugin still needs the maximum locking protocol version, though. This changes the plugin structure so that it only holds the max version, not the entire ocfs2_locking_protocol pointer. Signed-off-by: Joel Becker <joel.becker@oracle.com>
1 parent 110946c commit e603cfb

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

‎fs/ocfs2/stack_user.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@
6262
* negotiated by the client. The client negotiates based on the maximum
6363
* version advertised in /sys/fs/ocfs2/max_locking_protocol. The major
6464
* number from the "SETV" message must match
65-
* ocfs2_user_plugin.sp_proto->lp_max_version.pv_major, and the minor number
66-
* must be less than or equal to ...->lp_max_version.pv_minor.
65+
* ocfs2_user_plugin.sp_max_proto.pv_major, and the minor number
66+
* must be less than or equal to ...sp_max_version.pv_minor.
6767
*
6868
* Once this information has been set, mounts will be allowed. From this
6969
* point on, the "DOWN" message can be sent for node down notification.
@@ -400,7 +400,7 @@ static int ocfs2_control_do_setversion_msg(struct file *file,
400400
char *ptr = NULL;
401401
struct ocfs2_control_private *p = file->private_data;
402402
struct ocfs2_protocol_version *max =
403-
&ocfs2_user_plugin.sp_proto->lp_max_version;
403+
&ocfs2_user_plugin.sp_max_proto;
404404

405405
if (ocfs2_control_get_handshake_state(file) !=
406406
OCFS2_CONTROL_HANDSHAKE_PROTOCOL)

‎fs/ocfs2/stackglue.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ int ocfs2_stack_glue_register(struct ocfs2_stack_plugin *plugin)
176176
spin_lock(&ocfs2_stack_lock);
177177
if (!ocfs2_stack_lookup(plugin->sp_name)) {
178178
plugin->sp_count = 0;
179-
plugin->sp_proto = lproto;
179+
plugin->sp_max_proto = lproto->lp_max_version;
180180
list_add(&plugin->sp_list, &ocfs2_stack_list);
181181
printk(KERN_INFO "ocfs2: Registered cluster interface %s\n",
182182
plugin->sp_name);
@@ -224,7 +224,7 @@ void ocfs2_stack_glue_set_locking_protocol(struct ocfs2_locking_protocol *proto)
224224

225225
lproto = proto;
226226
list_for_each_entry(p, &ocfs2_stack_list, sp_list) {
227-
p->sp_proto = lproto;
227+
p->sp_max_proto = lproto->lp_max_version;
228228
}
229229

230230
spin_unlock(&ocfs2_stack_lock);

‎fs/ocfs2/stackglue.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ struct ocfs2_stack_plugin {
233233
/* These are managed by the stackglue code. */
234234
struct list_head sp_list;
235235
unsigned int sp_count;
236-
struct ocfs2_locking_protocol *sp_proto;
236+
struct ocfs2_protocol_version sp_max_proto;
237237
};
238238

239239

0 commit comments

Comments
 (0)