static int loadgen_usage(int argc, char **argv)
{
if (argc == 1) {
- fprintf(stderr,
+ fprintf(stderr,
"This is a test program used to simulate large numbers of\n"
"clients. The echo obds are used, so the obdecho module must\n"
"be loaded.\n"
threads, live_threads);
return -EOVERFLOW;
}
- trigger(C_WRITE, threads, atoi(argv[2]),
+ trigger(C_WRITE, threads, atoi(argv[2]),
(argc == 4) ? atoi(argv[3]) : 0);
return 0;
}
cmdname, rc);
goto clean;
}
-
+
/* Create an OSS to handle the communications */
/* attach ost OSS OSS_UUID */
args[1] = "ost";
static int loadgen_wait(int argc, char **argv)
{
- /* Give scripts a chance to start some threads */
+ /* Give scripts a chance to start some threads */
sleep(1);
while (!all_done) {
sleep(1);
static int loadgen_exit()
{
int rc;
-
+
printf("stopping %d children\n", live_threads);
kill_kids();
rc = wait_for_threads();
out:
obd_finalize(argc, argv);
- return rc;
+ return rc < 0 ? -rc : rc;
}
#ifndef LIBLUSTRE_TEST