Move gtod_cpu affinity check to verify callback
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/options.c b/options.c
index 354067d..8c0c2ab 100644
--- a/options.c
+++ b/options.c
@@ -588,6 +588,21 @@
return 0;
}
+static int gtod_cpu_rw_verify(struct fio_option *o, void *data)
+{
+ struct thread_data *td = data;
+
+#ifndef FIO_HAVE_CPU_AFFINITY
+ if (td->o.gtod_cpu) {
+ log_err("fio: platform must support CPU affinity for"
+ "gettimeofday() offloading\n");
+ return 1;
+ }
+#endif
+
+ return 0;
+}
+
#define __stringify_1(x) #x
#define __stringify(x) __stringify_1(x)
@@ -1534,6 +1549,7 @@
.type = FIO_OPT_INT,
.cb = str_gtod_cpu_cb,
.help = "Setup dedicated gettimeofday() thread on this CPU",
+ .verify = gtod_cpu_verify,
},
{
.name = "continue_on_error",