nfs: Fix incorrect engine registering for '--enghelp' list
authorVitaly Chikunov <vt@altlinux.org>
Tue, 24 Oct 2023 02:29:40 +0000 (05:29 +0300)
committerVitaly Chikunov <vt@altlinux.org>
Wed, 25 Oct 2023 19:27:00 +0000 (22:27 +0300)
`ioengine` from `nfs` (internal) engine is incorrectly exported thus
overriding its value in constructor callbacks of other external engines,
that are used for registering engine for listing with `--enghelp`.

Because flist is unsafe to double adding it also making `engine_list` to
become corrupt and causing infinite loop or abnormal list termination
when printing engine list.

Issue: https://github.com/axboe/fio/issues/1655
Fixes: 9326926b ("NFS engine")
Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
engines/nfs.c

index 970962a3f9d4d762e7d56c57e1846d64d9893144..ce748d1448ef4b852aaa7cef0c2d2579129c70e9 100644 (file)
@@ -308,7 +308,7 @@ static int fio_libnfs_close(struct thread_data *td, struct fio_file *f)
        return ret;
 }
 
-struct ioengine_ops ioengine = {
+static struct ioengine_ops ioengine = {
        .name           = "nfs",
        .version        = FIO_IOOPS_VERSION,
        .setup          = fio_libnfs_setup,