Error if td flags overlap with engine flags
authorJens Axboe <axboe@kernel.dk>
Wed, 11 Oct 2017 18:28:50 +0000 (12:28 -0600)
committerJens Axboe <axboe@kernel.dk>
Wed, 11 Oct 2017 18:28:50 +0000 (12:28 -0600)
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fio.h
libfio.c

diff --git a/fio.h b/fio.h
index 63371ffe087569c7296984f8b9ad02838695f9da..28d064cfe868b43ba0bf56e3bcecbcec082807be 100644 (file)
--- a/fio.h
+++ b/fio.h
@@ -87,6 +87,7 @@ enum {
        __TD_F_NO_PROGRESS,
        __TD_F_REGROW_LOGS,
        __TD_F_MMAP_KEEP,
+       __TD_F_LAST,            /* not a real bit, keep last */
 };
 
 enum {
index 14ddc4d03302758d95d08a45a2eb4d740798441b..830759a78475a7b3de224080eb23ea29d37d3d59 100644 (file)
--- a/libfio.c
+++ b/libfio.c
@@ -365,6 +365,8 @@ int initialize_fio(char *envp[])
        compiletime_assert((offsetof(struct thread_options_pack, latency_percentile) % 8) == 0, "latency_percentile");
        compiletime_assert((offsetof(struct jobs_eta, m_rate) % 8) == 0, "m_rate");
 
+       compiletime_assert(__TD_F_LAST <= TD_ENG_FLAG_SHIFT, "TD_ENG_FLAG_SHIFT");
+
        err = endian_check();
        if (err) {
                log_err("fio: endianness settings appear wrong.\n");