Replace CONFIG_CPU_COUNT with plain CPU_COUNT

Fixes double-declartion issue of CPU_COUNT when fio.h is included by
third-party projects.

Checking for a define of CPU_COUNT seems to be a common approach
to deal with different versions of sched.h

Signed-off-by: Daniel Gollub <daniel.gollub@gmail.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
distinguish internal/ext. builds with FIO_INTERNAL

To distinguish between internal and external includes of
fio.h and other headers FIO_INTERNAL get applied only for
the fio (and gfio) internal build itself.

This helps to prevent double-declaration issues by making
ambigous declaration with common names coditional based on
the FIO_INTERNAL define.

Signed-off-by: Daniel Gollub <daniel.gollub@gmail.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Avoid double-declaration of ARRAY_SIZE

for external ioengines. ARRAY_SIZE is a very common
declaration - e.g. Ceph is using this as well.

Signed-off-by: Daniel Gollub <daniel.gollub@gmail.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Avoid double declaration of leXX_to_cpu

for external ioengines. leXX_to_cpu is a very common
declaration - e.g. Ceph is using this as well.

Signed-off-by: Daniel Gollub <daniel.gollub@gmail.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
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>