From 9c6f1e756dbf6c0916b0b94d9b0bcd1d9c43b9e9 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Wed, 11 Oct 2017 12:28:50 -0600 Subject: [PATCH] Error if td flags overlap with engine flags Signed-off-by: Jens Axboe --- fio.h | 1 + libfio.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/fio.h b/fio.h index 63371ffe..28d064cf 100644 --- 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 { diff --git a/libfio.c b/libfio.c index 14ddc4d0..830759a7 100644 --- 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"); -- 2.25.1