bdev: move marking bdev module as async to init path
Previously whenever bdev module went through init>fini>init, the async modules would trigger assert in spdk_bdev_module_action_done(). This was because starting value for action_in_progress was being set only once - during registration of the modules. With this change, modules are set as async just before their init start. Change-Id: If177a8dc97812b1b264cb61d5ad202ce47fca3b5 Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/454614 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
This commit is contained in:
parent
196bb8a557
commit
2bbd1eb444
@ -876,6 +876,9 @@ spdk_bdev_modules_init(void)
|
||||
|
||||
TAILQ_FOREACH(module, &g_bdev_mgr.bdev_modules, internal.tailq) {
|
||||
g_resume_bdev_module = module;
|
||||
if (module->async_init) {
|
||||
module->internal.action_in_progress = 1;
|
||||
}
|
||||
rc = module->module_init();
|
||||
if (rc != 0) {
|
||||
return rc;
|
||||
@ -4174,10 +4177,6 @@ spdk_bdev_module_list_add(struct spdk_bdev_module *bdev_module)
|
||||
assert(false);
|
||||
}
|
||||
|
||||
if (bdev_module->async_init) {
|
||||
bdev_module->internal.action_in_progress = 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Modules with examine callbacks must be initialized first, so they are
|
||||
* ready to handle examine callbacks from later modules that will
|
||||
|
Loading…
x
Reference in New Issue
Block a user