If fio is invoked as a client and the job file does not exist, it
will exit ala:
fio: job file <x.fio> open: No such file or directory
fio: client.c:240: remove_client: Assertion `client->refs' failed.
because the break path ends up doing the removal twice. Fix that
to only remove it once, so we don't trigger the assert.
Signed-off-by: Jens Axboe <axboe@fb.com>
struct flist_head *entry, *tmp;
flist_for_each_safe(entry, tmp, &client_list) {
+ bool failed = false;
+
client = flist_entry(entry, struct fio_client, list);
if (client->nr_files) {
cf = &client->files[i];
if (fio_client_send_cf(client, cf)) {
+ failed = true;
remove_client(client);
break;
}
}
}
- if (client->sent_job)
+ if (client->sent_job || failed)
continue;
if (!filename || fio_client_send_ini(client, filename, 0))
remove_client(client);