From 5bf13a5a5f01986c5b87db26f0cadf95af133188 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Sat, 17 Feb 2007 01:51:47 +0100 Subject: [PATCH] [PATCH] Fixup client error exit Sometimes we just quit without dumping the client error info, fix that up. Signed-off-by: Jens Axboe --- fio.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/fio.c b/fio.c index 61fd0989..e8a86585 100644 --- a/fio.c +++ b/fio.c @@ -400,7 +400,6 @@ static void do_io(struct thread_data *td) break; memcpy(&s, &io_u->start_time, sizeof(s)); - requeue: ret = td_io_queue(td, io_u); if (ret) { @@ -756,12 +755,13 @@ static void *thread_main(void *data) terminate_threads(td->groupid, 0); err: + if (td->error) + printf("fio: pid=%d, err=%d/%s\n", td->pid, td->error, td->verror); close_files(td); close_ioengine(td); cleanup_io_u(td); td_set_runstate(td, TD_EXITED); return NULL; - } /* @@ -873,6 +873,9 @@ static void run_threads(void) * client data interspersed on disk */ if (setup_files(td)) { + exit_value++; + if (td->error) + log_err("fio: pid=%d, err=%d/%s\n", td->pid, td->error, td->verror); td_set_runstate(td, TD_REAPED); todo--; } -- 2.25.1