options: turn missing options into debug parse messages
authorJens Axboe <axboe@fb.com>
Fri, 19 Dec 2014 15:04:48 +0000 (08:04 -0700)
committerJens Axboe <axboe@fb.com>
Fri, 19 Dec 2014 15:04:48 +0000 (08:04 -0700)
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>
options.c
options.h

index 6ceefbc10a0fd158e5bbcfd48a825af9851d375a..e3c9c87b8ef4e3fb44b5695ebac982e607e300fd 100644 (file)
--- a/options.c
+++ b/options.c
@@ -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));
index e830884660266cf3fb2471ace132bb20bd9c9e1b..36fd35d2f6e72ed67f316b8fe4c317f89b751eff 100644 (file)
--- a/options.h
+++ b/options.h
@@ -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;                                                            \