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>
diff --git a/thread_options.h b/thread_options.h
index 41b6e54..57d84db 100644
--- a/thread_options.h
+++ b/thread_options.h
@@ -158,14 +158,12 @@
os_cpu_mask_t verify_cpumask;
unsigned int verify_cpumask_set;
unsigned int cpus_allowed_policy;
-#ifdef CONFIG_LIBNUMA
- struct bitmask *numa_cpunodesmask;
+ char *numa_cpunodes;
unsigned int numa_cpumask_set;
unsigned short numa_mem_mode;
unsigned int numa_mem_prefer_node;
- struct bitmask *numa_memnodesmask;
+ char *numa_memnodes;
unsigned int numa_memmask_set;
-#endif
unsigned int iolog;
unsigned int rwmixcycle;
unsigned int rwmix[DDIR_RWDIR_CNT];