[PVFS2-CVS] commit by rbross in pvfs2/src/apps/karma: comm.c
CVS commit program
cvs at parl.clemson.edu
Sun Feb 15 18:49:02 EST 2004
Update of /projects/cvsroot/pvfs2/src/apps/karma
In directory parlweb:/tmp/cvs-serv28457/src/apps/karma
Modified Files:
comm.c
Log Message:
PVFS_mgmt_statfs_list() is now handling errors the way we discussed on the mailing list.
Karma understands the partial success return code (still a misnomer) and reports failed servers.
Index: comm.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/apps/karma/comm.c,v
diff -p -u -r1.12 -r1.13
--- comm.c 15 Feb 2004 05:03:51 -0000 1.12
+++ comm.c 15 Feb 2004 23:49:02 -0000 1.13
@@ -301,13 +301,35 @@ static int gui_comm_stats_collect(void)
internal_addrs,
internal_errors,
internal_stat_ct);
- if (ret < 0)
- {
+ if (ret == 0) return 0;
+ else if (ret == -PVFS_EPARTIAL) {
+ int i;
+ for (i=0; i < internal_stat_ct; i++)
+ {
+ char msgbuf[64];
+
+ if (internal_errors[i] != 0) {
+ /* note: statfs_list already clears out values,
+ * so we don't need to zero stat fields in failure
+ * cases.
+ */
+
+ snprintf(msgbuf,
+ 64,
+ "Server %d not responding (need to map to addr!).\n",
+ i);
+ gui_message_new(msgbuf);
+
+ }
+ }
+
+ return 0;
+ }
+ else {
PVFS_perror("PVFS_mgmt_statfs_list", ret);
return -1;
}
#endif
- return 0;
}
/* gui_comm_perf_collect()
More information about the PVFS2-CVS
mailing list