From: Jens Axboe Date: Thu, 23 Apr 2015 01:54:54 +0000 (-0600) Subject: blktrace: only probe and set depth if option isn't set X-Git-Tag: fio-2.2.8~30 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=8a16f59b66e5198050ec735998692ba9436a9884 blktrace: only probe and set depth if option isn't set The comment predates fio's support for checking whether a specific option was set, we have the power to check this properly now. Signed-off-by: Jens Axboe --- diff --git a/blktrace.c b/blktrace.c index 9afc5be0..e63c7086 100644 --- a/blktrace.c +++ b/blktrace.c @@ -456,10 +456,9 @@ int load_blktrace(struct thread_data *td, const char *filename, int need_swap) td->o.odirect = 1; /* - * we don't know if this option was set or not. it defaults to 1, - * so we'll just guess that we should override it if it's still 1 + * If depth wasn't manually set, use probed depth */ - if (td->o.iodepth == 1) + if (!fio_option_is_set(&td->o, iodepth)) td->o.iodepth = td->o.iodepth_low = depth; return 0;