This patch makes bjs comply with the changed semantics of
xp_nodeset_list_by_state to obtain the down nodes from statfs.

Signed-off-by: Abhishek Kulkarni <[EMAIL PROTECTED]> 

Index: bjs.c
===================================================================
--- bjs.c       (revision 746)
+++ bjs.c       (working copy)
@@ -2481,19 +2481,7 @@
 
        if (r > 0) {
            /* Check for machine status changes */
-           /* TODO: Instead of jumping over these hoops, improve the
-              way down nodes can be obtained from statfs */ 
-
-           down_nodeset = xp_nodeset_list_by_state(conf.statfsaddr,
"down(initializing)");
-           xp_nodeset_append(down_nodeset, 
-                             xp_nodeset_list_by_state(conf.statfsaddr,
"down(disconnected)"));
-           xp_nodeset_append(down_nodeset, 
-                             xp_nodeset_list_by_state(conf.statfsaddr,
"down(connect_failed)"));
-           xp_nodeset_append(down_nodeset, 
-                             xp_nodeset_list_by_state(conf.statfsaddr,
"down(read_failed)"));
-           xp_nodeset_append(down_nodeset, 
-                             xp_nodeset_list_by_state(conf.statfsaddr,
"down(no_contact)"));
-
+           down_nodeset = xp_nodeset_list_by_state(conf.statfsaddr, 0);
            if (down_nodeset->len != down_nodes) {
                if (verbose) syslog(LOG_INFO, "XCPU cluster status change.");
                chng = update_cluster_status(conf.statfsaddr);
@@ -2505,9 +2493,10 @@
                            p->policy->state_change(p);
                    }
                }
+               down_nodes = down_nodeset->len;
            }
-           down_nodes = down_nodeset->len;
 
+
            /* Check for new clients */
            if (FD_ISSET(conf.client_sockfd, &rset))
                client_accept();


Reply via email to