* [PATCH] rate-submit: call ioengine post_init when starting workers
@ 2019-01-24 19:26 vincentfu
2019-01-24 20:57 ` Jens Axboe
0 siblings, 1 reply; 2+ messages in thread
From: vincentfu @ 2019-01-24 19:26 UTC (permalink / raw)
To: axboe, fio; +Cc: Vincent Fu
From: Vincent Fu <vincent.fu@wdc.com>
ioengines with post_init steps were not fully fully initialized by
offload worker threads because the post_init function was never called.
Without this patch all libaio operations submitted in offload mode fail
because the ioengine was not fully initialized.
Fixes: 2041bd343da1 ("engines/libaio: add preliminary support for pre-mapped IO buffers")
---
rate-submit.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/rate-submit.c b/rate-submit.c
index b07a2072..cf00d9bc 100644
--- a/rate-submit.c
+++ b/rate-submit.c
@@ -165,6 +165,9 @@ static int io_workqueue_init_worker_fn(struct submit_worker *sw)
if (td_io_init(td))
goto err_io_init;
+ if (td->io_ops->post_init && td->io_ops->post_init(td))
+ goto err_io_init;
+
set_epoch_time(td, td->o.log_unix_epoch);
fio_getrusage(&td->ru_start);
clear_io_state(td, 1);
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] rate-submit: call ioengine post_init when starting workers
2019-01-24 19:26 [PATCH] rate-submit: call ioengine post_init when starting workers vincentfu
@ 2019-01-24 20:57 ` Jens Axboe
0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2019-01-24 20:57 UTC (permalink / raw)
To: vincentfu, fio; +Cc: Vincent Fu
On 1/24/19 12:26 PM, vincentfu@gmail.com wrote:
> From: Vincent Fu <vincent.fu@wdc.com>
>
> ioengines with post_init steps were not fully fully initialized by
> offload worker threads because the post_init function was never called.
>
> Without this patch all libaio operations submitted in offload mode fail
> because the ioengine was not fully initialized.
Thanks Vincent, applied.
--
Jens Axboe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-01-24 20:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-24 19:26 [PATCH] rate-submit: call ioengine post_init when starting workers vincentfu
2019-01-24 20:57 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox