Allow offload with FAKEIO engines
authorJens Axboe <axboe@kernel.dk>
Fri, 11 Sep 2020 15:58:15 +0000 (09:58 -0600)
committerJens Axboe <axboe@kernel.dk>
Fri, 11 Sep 2020 15:58:15 +0000 (09:58 -0600)
The last check was too restrictive, we can allow it with the fake IO
engines.

Fixes: abfd235a0533 ("Disable io_submit_mode=offload with async engines")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
ioengines.c

index 32583d5a802f1d41a3d4dfa109d44dfbaea3f1b9..d3be8026c62d0e9a9fa9bbe3bf9064c336d686cf 100644 (file)
@@ -44,7 +44,8 @@ static bool check_engine_ops(struct thread_data *td, struct ioengine_ops *ops)
        /*
         * async engines aren't reliable with offload
         */
-       if (td->o.io_submit_mode == IO_MODE_OFFLOAD) {
+       if ((td->o.io_submit_mode == IO_MODE_OFFLOAD) &&
+           !(ops->flags & FIO_FAKEIO)) {
                log_err("%s: can't be used with offloaded submit. Use a sync "
                        "engine\n", ops->name);
                return true;