Merge in crc32c-intel probe
Then we can kill the option callback.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
diff --git a/backend.c b/backend.c
index fcb74dc..c397eb1 100644
--- a/backend.c
+++ b/backend.c
@@ -1256,6 +1256,8 @@
goto err;
}
+ fio_verify_init(td);
+
fio_gettime(&td->epoch, NULL);
fio_getrusage(&td->ru_start);
clear_state = 0;
diff --git a/options.c b/options.c
index e30aacc..16b9fbc 100644
--- a/options.c
+++ b/options.c
@@ -348,18 +348,6 @@
return 0;
}
-static int str_verify_cb(void *data, const char *mem)
-{
- struct thread_data *td = data;
-
- if (td->o.verify == VERIFY_CRC32C_INTEL ||
- td->o.verify == VERIFY_CRC32C) {
- crc32c_intel_probe();
- }
-
- return 0;
-}
-
static int fio_clock_source_cb(void *data, const char *str)
{
struct thread_data *td = data;
@@ -2091,7 +2079,6 @@
.type = FIO_OPT_STR,
.off1 = td_var_offset(verify),
.help = "Verify data written",
- .cb = str_verify_cb,
.def = "0",
.category = FIO_OPT_C_IO,
.group = FIO_OPT_G_VERIFY,
diff --git a/verify.c b/verify.c
index daa2f04..787cc37 100644
--- a/verify.c
+++ b/verify.c
@@ -1006,6 +1006,14 @@
return 1;
}
+void fio_verify_init(struct thread_data *td)
+{
+ if (td->o.verify == VERIFY_CRC32C_INTEL ||
+ td->o.verify == VERIFY_CRC32C) {
+ crc32c_intel_probe();
+ }
+}
+
static void *verify_async_thread(void *data)
{
struct thread_data *td = data;
diff --git a/verify.h b/verify.h
index 7c238c8..6a81e9b 100644
--- a/verify.h
+++ b/verify.h
@@ -75,6 +75,7 @@
extern int __must_check verify_io_u(struct thread_data *, struct io_u *);
extern int verify_io_u_async(struct thread_data *, struct io_u *);
extern void fill_pattern(struct thread_data *td, void *p, unsigned int len, struct io_u *io_u, unsigned long seed, int use_seed);
+extern void fio_verify_init(struct thread_data *td);
/*
* Async verify offload