Update of /cvsroot/ssic-linux/openssi/kernel/cluster/ssi/vproc
In directory sc8-pr-cvs1:/tmp/cvs-serv17069/cluster/ssi/vproc
Modified Files:
dvp_pvpsops.c dvp_vpsops.c
Log Message:
******Clusterize sys_reboot() system call*****
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
-----Also
BUG FIX for previous check-in
Only disable interrupts for halt and power-down so that reboot works
Clean-up comilation warnings and dead code from pvpsop_shutdown()
sys_reboot()
Check for valid command before going remote
Make CAD_ON and CAD_OFF local only
Index: dvp_pvpsops.c
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/cluster/ssi/vproc/dvp_pvpsops.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** dvp_pvpsops.c 5 Jun 2003 22:39:45 -0000 1.1
--- dvp_pvpsops.c 26 Jun 2003 00:33:40 -0000 1.2
***************
*** 33,36 ****
--- 33,37 ----
#include <linux/nd.h>
#include <linux/kernel.h>
+ #include <linux/reboot.h>
#include <asm/uaccess.h>
#include <cluster/clms.h>
***************
*** 39,42 ****
--- 40,44 ----
#include <cluster/assert.h>
#include <cluster/ssi/load_level.h>
+ #include <cluster/node_monitor.h>
#include "rproc.h"
***************
*** 746,750 ****
* Local private virtual process system operation for PVPSOP_SHUTDOWN()
*/
! int
pvpsop_shutdown(
clusternode_t node,
--- 748,752 ----
* Local private virtual process system operation for PVPSOP_SHUTDOWN()
*/
! long
pvpsop_shutdown(
clusternode_t node,
***************
*** 752,856 ****
int flag2)
{
- cli_handle_t **handle_list, **handle_list_ptr;
nsc_nodelist_t *nodelist;
int num_nodes;
nsc_nlcookie_t cookie;
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;
}
--- 754,799 ----
int flag2)
{
nsc_nodelist_t *nodelist;
int num_nodes;
nsc_nlcookie_t cookie;
clusternode_t dep_node;
! 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);
! /*
! * 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);
! /*
! * Delay the reboot at the root node to allow time for
! * the reboot messages to get out.
! */
! idelay(15);
! nm_kill_master_daemons();
! if (flag1 == LINUX_REBOOT_CMD_HALT || flag1 ==
LINUX_REBOOT_CMD_POWER_OFF)
! cli();
! /*
! * Reboot the root node.
! */
! return pps_reboot(flag1, (void *)flag2);
}
***************
*** 879,883 ****
* Reboot the node.
*/
! pps_reboot(flag1, flag2);
return 0;
--- 822,829 ----
* Reboot the node.
*/
! nm_kill_client_daemons();
! if (flag1 == LINUX_REBOOT_CMD_HALT || flag1 ==
LINUX_REBOOT_CMD_POWER_OFF)
! 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
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** dvp_vpsops.c 5 Jun 2003 22:39:45 -0000 1.1
--- dvp_vpsops.c 26 Jun 2003 00:33:40 -0000 1.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
|