Avoid buildenv conditional in thread_option struct
authorDaniel Gollub <daniel.gollub@gmail.com>
Thu, 1 May 2014 15:07:49 +0000 (17:07 +0200)
committerJens Axboe <axboe@fb.com>
Thu, 1 May 2014 17:21:56 +0000 (11:21 -0600)
commit435228488ffd062f4eac710aaa862e04cd20dfee
tree503da8f8ae404f300ffc9bf8d0720fec6d7e2e46
parent0bbe46e7051d1ff9469ff9d021656793c6f3c4c2
Avoid buildenv conditional in thread_option struct

Managed to run into issues with an external ioengine
which got build with CONFIG_LIBNUMA not defined. Fio
itself got build with CONFIG_LIBNUMA this resulted
in different struct members offsets in the two different
ELF objects. Causing crashes due to invalidate offsets
inside the thread_data structure (e.g. td->io_ops->data).

Ideally all structs which might be used by external
ioengines should be independent of buildenv conditionals
like CONFIG_LIBNUMA or others.

Removed the CONFIG_LIBNUMA in thread_options.h and replaced
the libnuma specific "struct bitmask" members with strings
which hold the option's input value. This should also make
the marshaling/demarshaling in cconv.c easier.
(Note: the NUMA bits are not handled in cconv.c at the
moment. And not part of the thread_options_packed struct)

Signed-off-by: Daniel Gollub <daniel.gollub@gmail.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
backend.c
options.c
thread_options.h