Skip to contentSkip to conversation

rate-submit: call ioengine post_init when starting workers

PATCH In review [email protected] 2 participants 2 messages Jan 24, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rate-submit: call ioengine post_init when starting workers

From: Vincent Fu <[email protected]>

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(+)
rate-submit.c +3 -0
index b07a2072..cf00d9bc 100644
@@ -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);
Signature · 1 line
2.17.1
#1 lore raw
Quoted 7 lines · On 1/24/19 12:26 PM, [email protected] wrote:

From: Vincent Fu <[email protected]>

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.

Signature · 1 line
Jens Axboe