diff options
author | Jens Axboe <axboe@fb.com> | 2014-12-19 08:04:48 -0700 |
---|---|---|
committer | Mohamad Ayyash <mkayyash@google.com> | 2015-03-06 17:58:10 -0800 |
commit | 0703ea0b73352f28f62d1322de7e47ff3de42187 (patch) | |
tree | 667cafb0e867dd491f10cb5124f6e234180b8465 | |
parent | 3c0f526fe3fd4f9254cbc2c3ee960294155a8123 (diff) | |
download | fio-0703ea0b73352f28f62d1322de7e47ff3de42187.tar.gz |
options: turn missing options into debug parse messages
It's not an error, we expect it to happen if we try and check
for set options that aren't available (due to being platform
specific, libraries missing, etc).
This fixes cases where fio would spew:
fio: no option found at offset 1240
and other offsets.
Signed-off-by: Jens Axboe <axboe@fb.com>
-rw-r--r-- | options.c | 4 | ||||
-rw-r--r-- | options.h | 6 |
2 files changed, 5 insertions, 5 deletions
@@ -4204,10 +4204,8 @@ int __fio_option_is_set(struct thread_options *o, unsigned int off1) } } - if (!opt) { - log_err("fio: no option found at offset %u\n", off1); + if (!opt) return -1; - } opt_off = opt - &fio_options[0]; index = opt_off / (8 * sizeof(uint64_t)); @@ -26,9 +26,11 @@ extern int __fio_option_is_set(struct thread_options *, unsigned int off); #define fio_option_is_set(__td, name) \ ({ \ - int __r = __fio_option_is_set((__td), td_var_offset(name)); \ + const unsigned int off = td_var_offset(name); \ + int __r = __fio_option_is_set((__td), off); \ if (__r == -1) { \ - log_err("fio: wanted %s\n", __fio_stringify(name)); \ + dprint(FD_PARSE, "option %s/%u not found in map\n", \ + __fio_stringify(name), off); \ __r = 0; \ } \ __r; \ |