Update of /cvsroot/ssic-linux/openssi/kernel/cluster/ssi/vproc
In directory sc8-pr-cvs1:/tmp/cvs-serv32566/cluster/ssi/vproc
Modified Files:
Tag: OPENSSI-RH
dvp_pvpsops.c dvp_vpsops.c
Log Message:
Turn linux base reboot code into pps_reboot() function
Make VPSOP_SHUTDOWN() work for linux
fixing internal prototypes
Since linux doesn't always halt machines try to make machine go idle
Call clms_shutdown_freeze() on master
Turn off node monitoring on clients & master
disable interrupts on all nodes
Index: dvp_pvpsops.c
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/cluster/ssi/vproc/dvp_pvpsops.c,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -C2 -d -r1.1.2.1 -r1.1.2.2
*** dvp_pvpsops.c 7 Jun 2003 01:58:23 -0000 1.1.2.1
--- dvp_pvpsops.c 25 Jun 2003 22:25:16 -0000 1.1.2.2
***************
*** 746,750 ****
* Local private virtual process system operation for PVPSOP_SHUTDOWN()
*/
! int
pvpsop_shutdown(
clusternode_t node,
--- 746,750 ----
* Local private virtual process system operation for PVPSOP_SHUTDOWN()
*/
! long
pvpsop_shutdown(
clusternode_t node,
***************
*** 758,856 ****
clusternode_t dep_node;
int error, rval;
! /*
! * If the specified node is not the local node,
! * perform the operation remotely.
! */
! if (node != this_node) {
! int ret, error;
! RPVPSOP_START(node,error,"pvpsop_shutdown");
! ret = RPVPSOP_SHUTDOWN(node,&error,flag1,flag2);
! RPVPSOP_END(ret,error,"pvpsop_shutdown");
! return(error);
! }
!
! if (node == init_node) {
! clms_shutdown_freeze();
!
! nodelist = clms_get_nsc_nodelist(CLMS_NODE_HALF_UP|
! CLMS_NODE_UP|
! CLMS_NODE_HALF_DOWN);
! ASSERT(nodelist != NULL);
!
! num_nodes = NSC_NODELIST_COUNT(nodelist);
! handle_list = kmalloc_nofail(num_nodes
! * sizeof(cli_handle_t *));
!
! /*
! * Send shutdown notifications to all nodes in the cluster.
! */
! handle_list_ptr = handle_list;
! NSC_NLCOOKIE_INIT(&cookie);
! while ((dep_node = NSC_NODELIST_GET_NEXT(&cookie, nodelist))
! != CLUSTERNODE_INVAL) {
! if (dep_node != this_node) {
! error = PVPSOP_SHUTDOWN_SEND(dep_node,
! handle_list_ptr,
! flag1,
! flag2);
! if (error == 0)
! handle_list_ptr++;
! }
! }
! /*
! * Wait for the asynchronous responses from the dependent
! * nodes.
! */
! handle_list_ptr = handle_list;
! NSC_NLCOOKIE_INIT(&cookie);
! while ((dep_node = NSC_NODELIST_GET_NEXT(&cookie, nodelist))
! != CLUSTERNODE_INVAL) {
! if (dep_node != this_node) {
! PVPSOP_SHUTDOWN_RECEIVE(*handle_list_ptr++,
! &rval,
! flag1,
! flag2);
! }
! }
! /*
! * Perform the physical shutdown operation on the root node.
! */
! pps_shutdown();
! /*
! * Send the reboot messages to the dependent nodes.
! */
! NSC_NLCOOKIE_INIT(&cookie);
! while ((dep_node = NSC_NODELIST_GET_NEXT(&cookie, nodelist))
! != CLUSTERNODE_INVAL) {
! if (dep_node != this_node)
! PVPSOP_REBOOT_MSG(dep_node, flag1, flag2);
! }
! NSC_NODELIST_FREE(nodelist);
! kfree((caddr_t)handle_list);
! /*
! * Delay the reboot at the root node to allow time for
! * the reboot messages to get out.
! */
! idelay(15);
! /*
! * Reboot the root node.
! */
! pps_reboot(flag1, flag2);
! }
! else {
! /*
! * Perform physical shutdown operation on the dependent node.
! */
! pps_shutdown();
! }
! return 0;
}
--- 758,802 ----
clusternode_t dep_node;
int error, rval;
+ extern int nm_disabled;
! clms_shutdown_freeze();
! /* Keep master from discovering down nodes */
! nm_disabled = 1;
! nodelist = clms_get_nsc_nodelist(CLMS_NODE_HALF_UP|
! CLMS_NODE_UP|
! CLMS_NODE_HALF_DOWN);
! ASSERT(nodelist != NULL);
! num_nodes = NSC_NODELIST_COUNT(nodelist);
! handle_list = kmalloc_nofail(num_nodes
! * sizeof(cli_handle_t *));
! /*
! * Send the reboot messages to the dependent nodes.
! */
! NSC_NLCOOKIE_INIT(&cookie);
! while ((dep_node = NSC_NODELIST_GET_NEXT(&cookie, nodelist))
! != CLUSTERNODE_INVAL) {
! if (dep_node != this_node)
! PVPSOP_REBOOT_MSG(dep_node, flag1, flag2);
! }
! NSC_NODELIST_FREE(nodelist);
! kfree((caddr_t)handle_list);
! /*
! * Delay the reboot at the root node to allow time for
! * the reboot messages to get out.
! */
! idelay(15);
! nm_kill_master_daemons();
! cli();
! /*
! * Reboot the root node.
! */
! return pps_reboot(flag1, (void *)flag2);
}
***************
*** 879,883 ****
* Reboot the node.
*/
! pps_reboot(flag1, flag2);
return 0;
--- 825,831 ----
* Reboot the node.
*/
! nm_kill_client_daemons();
! cli();
! pps_reboot(flag1, (void *)flag2);
return 0;
Index: dvp_vpsops.c
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/cluster/ssi/vproc/dvp_vpsops.c,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -C2 -d -r1.1.2.1 -r1.1.2.2
*** dvp_vpsops.c 7 Jun 2003 01:58:23 -0000 1.1.2.1
--- dvp_vpsops.c 25 Jun 2003 22:25:16 -0000 1.1.2.2
***************
*** 76,80 ****
* Virtual process system operation for VPSOP_SHUTDOWN()
*/
! void
vpsop_shutdown(
int flag1,
--- 76,80 ----
* Virtual process system operation for VPSOP_SHUTDOWN()
*/
! long
vpsop_shutdown(
int flag1,
***************
*** 84,87 ****
* Redirect to the init node.
*/
! (void) PVPSOP_SHUTDOWN(init_node, flag1, flag2);
}
--- 84,87 ----
* Redirect to the init node.
*/
! return PVPSOP_SHUTDOWN(init_node, flag1, flag2);
}
-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
|