From: Jens Axboe Date: Thu, 8 Dec 2005 10:36:22 +0000 (+0100) Subject: [PATCH] fio: pretty up thread add by folding ddir and sequential X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=e5c6e3de288a0b854f8db781ed9e6861040db53d;p=disktools.git [PATCH] fio: pretty up thread add by folding ddir and sequential --- diff --git a/fio-ini.c b/fio-ini.c index c6ff200..3a66830 100644 --- a/fio-ini.c +++ b/fio-ini.c @@ -160,8 +160,9 @@ static void put_job(struct thread_data *td) static int add_job(struct thread_data *td, const char *jobname, int prioclass, int prio) { + char *ddir_str[] = { "read", "write", "randread", "randwrite" }; struct stat sb; - int numjobs; + int numjobs, ddir; #ifndef FIO_HAVE_LIBAIO if (td->io_engine == FIO_LIBAIO) { @@ -230,7 +231,8 @@ static int add_job(struct thread_data *td, const char *jobname, int prioclass, if (write_bw_log) setup_log(&td->bw_log); - printf("Client%d (g=%d): rw=%d, prio=%d/%d, seq=%d, odir=%d, bs=%d-%d, rate=%d, ioengine=%s, iodepth=%d\n", td->thread_number, td->groupid, td->ddir, prioclass, prio, td->sequential, td->odirect, td->min_bs, td->max_bs, td->rate, td->io_engine_name, td->iodepth); + ddir = td->ddir + (!td->sequential << 1); + printf("Client%d (g=%d): rw=%s, prio=%d/%d, odir=%d, bs=%d-%d, rate=%d, ioengine=%s, iodepth=%d\n", td->thread_number, td->groupid, ddir_str[ddir], prioclass, prio, td->odirect, td->min_bs, td->max_bs, td->rate, td->io_engine_name, td->iodepth); /* * recurse add identical jobs, clear numjobs and stonewall options diff --git a/fio-io.c b/fio-io.c index b8b05f0..3183e8f 100644 --- a/fio-io.c +++ b/fio-io.c @@ -546,7 +546,6 @@ static int fio_sgio_queue(struct thread_data *td, struct io_u *io_u) sd->last_io_u = io_u; return io_u->error; - } static struct io_u *fio_sgio_event(struct thread_data *td, int event)