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