From: Jens Axboe Date: Mon, 9 Oct 2006 14:11:45 +0000 (+0200) Subject: [PATCH] Remember to check ioops version in loaded module X-Git-Tag: fio-1.7~34 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=b902ceb53977a12062c615ab529ca0c3422e3cff [PATCH] Remember to check ioops version in loaded module It could be for an older version of fio, reject failed version. Signed-off-by: Jens Axboe --- diff --git a/ioengines.c b/ioengines.c index 658b2eb5..17909636 100644 --- a/ioengines.c +++ b/ioengines.c @@ -46,6 +46,12 @@ struct ioengine_ops *load_ioengine(struct thread_data *td, char *name) return NULL; } + if (ops->version != FIO_IOOPS_VERSION) { + log_err("bad ioops version %d (want %d)\n", ops->version, FIO_IOOPS_VERSION); + dlclose(dlhandle); + return NULL; + } + ops->dlhandle = dlhandle; return ops; }