Skip to content

Commit 8bfe330

Browse files
committed
Disallow offload IO mode for engines marked with FIO_NO_OFFLOAD
Previous commits did this for all async engines, this can potentially break existing job files. There are only certain cases where it fails, for now at least mark io_uring as one of those. Reported-by: Jeff Furlong <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent 8cf503c commit 8bfe330

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

engines/io_uring.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -806,7 +806,7 @@ static int fio_ioring_close_file(struct thread_data *td, struct fio_file *f)
806806
static struct ioengine_ops ioengine = {
807807
.name = "io_uring",
808808
.version = FIO_IOOPS_VERSION,
809-
.flags = FIO_ASYNCIO_SYNC_TRIM,
809+
.flags = FIO_ASYNCIO_SYNC_TRIM | FIO_NO_OFFLOAD,
810810
.init = fio_ioring_init,
811811
.post_init = fio_ioring_post_init,
812812
.io_u_init = fio_ioring_io_u_init,

ioengines.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ static bool check_engine_ops(struct thread_data *td, struct ioengine_ops *ops)
4545
* async engines aren't reliable with offload
4646
*/
4747
if ((td->o.io_submit_mode == IO_MODE_OFFLOAD) &&
48-
!(ops->flags & FIO_FAKEIO)) {
48+
(ops->flags & FIO_NO_OFFLOAD)) {
4949
log_err("%s: can't be used with offloaded submit. Use a sync "
5050
"engine\n", ops->name);
5151
return true;

ioengines.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ enum fio_ioengine_flags {
7777
FIO_NOSTATS = 1 << 12, /* don't do IO stats */
7878
FIO_NOFILEHASH = 1 << 13, /* doesn't hash the files for lookup later. */
7979
FIO_ASYNCIO_SYNC_TRIM
80-
= 1 << 14 /* io engine has async ->queue except for trim */
80+
= 1 << 14, /* io engine has async ->queue except for trim */
81+
FIO_NO_OFFLOAD = 1 << 15, /* no async offload */
8182
};
8283

8384
/*

0 commit comments

Comments
 (0)