aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/stack_user.c
diff options
context:
space:
mode:
authorJonathan Corbet <corbet@lwn.net>2008-07-14 17:29:34 -0400
committerJonathan Corbet <corbet@lwn.net>2008-07-14 17:29:34 -0400
commit2fceef397f9880b212a74c418290ce69e7ac00eb (patch)
treed9cc09ab992825ef7fede4a688103503e3caf655 /fs/ocfs2/stack_user.c
parentfeae1ef116ed381625d3731c5ae4f4ebcb3fa302 (diff)
parentbce7f793daec3e65ec5c5705d2457b81fe7b5725 (diff)
Merge commit 'v2.6.26' into bkl-removal
Diffstat (limited to 'fs/ocfs2/stack_user.c')
-rw-r--r--fs/ocfs2/stack_user.c37
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
157static struct ocfs2_stack_plugin user_stack; 157static struct ocfs2_stack_plugin ocfs2_user_plugin;
158 158
159static atomic_t ocfs2_control_opened; 159static atomic_t ocfs2_control_opened;
160static int ocfs2_control_this_node = -1; 160static 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
704static void fsdlm_blocking_ast_wrapper(void *astarg, int level) 704static 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
711static int user_dlm_lock(struct ocfs2_cluster_connection *conn, 711static int user_dlm_lock(struct ocfs2_cluster_connection *conn,
@@ -819,8 +819,7 @@ out:
819 return rc; 819 return rc;
820} 820}
821 821
822static int user_cluster_disconnect(struct ocfs2_cluster_connection *conn, 822static 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
844static struct ocfs2_stack_operations user_stack_ops = { 843static 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
855static struct ocfs2_stack_plugin user_stack = { 854static 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
862static int __init user_stack_init(void) 861static 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
876static void __exit user_stack_exit(void) 875static 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
882MODULE_AUTHOR("Oracle"); 881MODULE_AUTHOR("Oracle");
883MODULE_DESCRIPTION("ocfs2 driver for userspace cluster stacks"); 882MODULE_DESCRIPTION("ocfs2 driver for userspace cluster stacks");
884MODULE_LICENSE("GPL"); 883MODULE_LICENSE("GPL");
885module_init(user_stack_init); 884module_init(ocfs2_user_plugin_init);
886module_exit(user_stack_exit); 885module_exit(ocfs2_user_plugin_exit);