diff options
Diffstat (limited to 'fs/ocfs2/stack_user.c')
-rw-r--r-- | fs/ocfs2/stack_user.c | 37 |
1 files changed, 18 insertions, 19 deletions
diff --git a/fs/ocfs2/stack_user.c b/fs/ocfs2/stack_user.c index b503772cd0ec..c021280dd462 100644 --- a/fs/ocfs2/stack_user.c +++ b/fs/ocfs2/stack_user.c | |||
@@ -61,7 +61,7 @@ | |||
61 | * negotiated by the client. The client negotiates based on the maximum | 61 | * negotiated by the client. The client negotiates based on the maximum |
62 | * version advertised in /sys/fs/ocfs2/max_locking_protocol. The major | 62 | * version advertised in /sys/fs/ocfs2/max_locking_protocol. The major |
63 | * number from the "SETV" message must match | 63 | * number from the "SETV" message must match |
64 | * user_stack.sp_proto->lp_max_version.pv_major, and the minor number | 64 | * ocfs2_user_plugin.sp_proto->lp_max_version.pv_major, and the minor number |
65 | * must be less than or equal to ...->lp_max_version.pv_minor. | 65 | * must be less than or equal to ...->lp_max_version.pv_minor. |
66 | * | 66 | * |
67 | * Once this information has been set, mounts will be allowed. From this | 67 | * Once this information has been set, mounts will be allowed. From this |
@@ -153,7 +153,7 @@ union ocfs2_control_message { | |||
153 | struct ocfs2_control_message_down u_down; | 153 | struct ocfs2_control_message_down u_down; |
154 | }; | 154 | }; |
155 | 155 | ||
156 | static struct ocfs2_stack_plugin user_stack; | 156 | static struct ocfs2_stack_plugin ocfs2_user_plugin; |
157 | 157 | ||
158 | static atomic_t ocfs2_control_opened; | 158 | static atomic_t ocfs2_control_opened; |
159 | static int ocfs2_control_this_node = -1; | 159 | static int ocfs2_control_this_node = -1; |
@@ -399,7 +399,7 @@ static int ocfs2_control_do_setversion_msg(struct file *file, | |||
399 | char *ptr = NULL; | 399 | char *ptr = NULL; |
400 | struct ocfs2_control_private *p = file->private_data; | 400 | struct ocfs2_control_private *p = file->private_data; |
401 | struct ocfs2_protocol_version *max = | 401 | struct ocfs2_protocol_version *max = |
402 | &user_stack.sp_proto->lp_max_version; | 402 | &ocfs2_user_plugin.sp_proto->lp_max_version; |
403 | 403 | ||
404 | if (ocfs2_control_get_handshake_state(file) != | 404 | if (ocfs2_control_get_handshake_state(file) != |
405 | OCFS2_CONTROL_HANDSHAKE_PROTOCOL) | 405 | OCFS2_CONTROL_HANDSHAKE_PROTOCOL) |
@@ -680,7 +680,7 @@ static void fsdlm_lock_ast_wrapper(void *astarg) | |||
680 | struct dlm_lksb *lksb = fsdlm_astarg_to_lksb(astarg); | 680 | struct dlm_lksb *lksb = fsdlm_astarg_to_lksb(astarg); |
681 | int status = lksb->sb_status; | 681 | int status = lksb->sb_status; |
682 | 682 | ||
683 | BUG_ON(user_stack.sp_proto == NULL); | 683 | BUG_ON(ocfs2_user_plugin.sp_proto == NULL); |
684 | 684 | ||
685 | /* | 685 | /* |
686 | * For now we're punting on the issue of other non-standard errors | 686 | * For now we're punting on the issue of other non-standard errors |
@@ -693,16 +693,16 @@ static void fsdlm_lock_ast_wrapper(void *astarg) | |||
693 | */ | 693 | */ |
694 | 694 | ||
695 | if (status == -DLM_EUNLOCK || status == -DLM_ECANCEL) | 695 | if (status == -DLM_EUNLOCK || status == -DLM_ECANCEL) |
696 | user_stack.sp_proto->lp_unlock_ast(astarg, 0); | 696 | ocfs2_user_plugin.sp_proto->lp_unlock_ast(astarg, 0); |
697 | else | 697 | else |
698 | user_stack.sp_proto->lp_lock_ast(astarg); | 698 | ocfs2_user_plugin.sp_proto->lp_lock_ast(astarg); |
699 | } | 699 | } |
700 | 700 | ||
701 | static void fsdlm_blocking_ast_wrapper(void *astarg, int level) | 701 | static void fsdlm_blocking_ast_wrapper(void *astarg, int level) |
702 | { | 702 | { |
703 | BUG_ON(user_stack.sp_proto == NULL); | 703 | BUG_ON(ocfs2_user_plugin.sp_proto == NULL); |
704 | 704 | ||
705 | user_stack.sp_proto->lp_blocking_ast(astarg, level); | 705 | ocfs2_user_plugin.sp_proto->lp_blocking_ast(astarg, level); |
706 | } | 706 | } |
707 | 707 | ||
708 | static int user_dlm_lock(struct ocfs2_cluster_connection *conn, | 708 | static int user_dlm_lock(struct ocfs2_cluster_connection *conn, |
@@ -816,8 +816,7 @@ out: | |||
816 | return rc; | 816 | return rc; |
817 | } | 817 | } |
818 | 818 | ||
819 | static int user_cluster_disconnect(struct ocfs2_cluster_connection *conn, | 819 | static int user_cluster_disconnect(struct ocfs2_cluster_connection *conn) |
820 | int hangup_pending) | ||
821 | { | 820 | { |
822 | dlm_release_lockspace(conn->cc_lockspace, 2); | 821 | dlm_release_lockspace(conn->cc_lockspace, 2); |
823 | conn->cc_lockspace = NULL; | 822 | conn->cc_lockspace = NULL; |
@@ -838,7 +837,7 @@ static int user_cluster_this_node(unsigned int *this_node) | |||
838 | return 0; | 837 | return 0; |
839 | } | 838 | } |
840 | 839 | ||
841 | static struct ocfs2_stack_operations user_stack_ops = { | 840 | static struct ocfs2_stack_operations ocfs2_user_plugin_ops = { |
842 | .connect = user_cluster_connect, | 841 | .connect = user_cluster_connect, |
843 | .disconnect = user_cluster_disconnect, | 842 | .disconnect = user_cluster_disconnect, |
844 | .this_node = user_cluster_this_node, | 843 | .this_node = user_cluster_this_node, |
@@ -849,20 +848,20 @@ static struct ocfs2_stack_operations user_stack_ops = { | |||
849 | .dump_lksb = user_dlm_dump_lksb, | 848 | .dump_lksb = user_dlm_dump_lksb, |
850 | }; | 849 | }; |
851 | 850 | ||
852 | static struct ocfs2_stack_plugin user_stack = { | 851 | static struct ocfs2_stack_plugin ocfs2_user_plugin = { |
853 | .sp_name = "user", | 852 | .sp_name = "user", |
854 | .sp_ops = &user_stack_ops, | 853 | .sp_ops = &ocfs2_user_plugin_ops, |
855 | .sp_owner = THIS_MODULE, | 854 | .sp_owner = THIS_MODULE, |
856 | }; | 855 | }; |
857 | 856 | ||
858 | 857 | ||
859 | static int __init user_stack_init(void) | 858 | static int __init ocfs2_user_plugin_init(void) |
860 | { | 859 | { |
861 | int rc; | 860 | int rc; |
862 | 861 | ||
863 | rc = ocfs2_control_init(); | 862 | rc = ocfs2_control_init(); |
864 | if (!rc) { | 863 | if (!rc) { |
865 | rc = ocfs2_stack_glue_register(&user_stack); | 864 | rc = ocfs2_stack_glue_register(&ocfs2_user_plugin); |
866 | if (rc) | 865 | if (rc) |
867 | ocfs2_control_exit(); | 866 | ocfs2_control_exit(); |
868 | } | 867 | } |
@@ -870,14 +869,14 @@ static int __init user_stack_init(void) | |||
870 | return rc; | 869 | return rc; |
871 | } | 870 | } |
872 | 871 | ||
873 | static void __exit user_stack_exit(void) | 872 | static void __exit ocfs2_user_plugin_exit(void) |
874 | { | 873 | { |
875 | ocfs2_stack_glue_unregister(&user_stack); | 874 | ocfs2_stack_glue_unregister(&ocfs2_user_plugin); |
876 | ocfs2_control_exit(); | 875 | ocfs2_control_exit(); |
877 | } | 876 | } |
878 | 877 | ||
879 | MODULE_AUTHOR("Oracle"); | 878 | MODULE_AUTHOR("Oracle"); |
880 | MODULE_DESCRIPTION("ocfs2 driver for userspace cluster stacks"); | 879 | MODULE_DESCRIPTION("ocfs2 driver for userspace cluster stacks"); |
881 | MODULE_LICENSE("GPL"); | 880 | MODULE_LICENSE("GPL"); |
882 | module_init(user_stack_init); | 881 | module_init(ocfs2_user_plugin_init); |
883 | module_exit(user_stack_exit); | 882 | module_exit(ocfs2_user_plugin_exit); |