Commit 5d41f22d authored by Mike Gerdts's avatar Mike Gerdts Committed by Tomasz Zawadzki
Browse files

bdev: spdk_bdev_module_init_done with async init



spdk_bdev_module_init() must only be called if the module sets
async_init to true. This patch fixes the doc string to match the
implementation and adds an assert() to catch API usage errors early.

Change-Id: I677345de028c8f7597ecf81ff9b9b855867bbf01
Signed-off-by: default avatarMike Gerdts <mgerdts@nvidia.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16133


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <smatsumoto@nvidia.com>
parent e70d2adc
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -951,8 +951,8 @@ void spdk_bdev_module_examine_done(struct spdk_bdev_module *module);
/**
 * Indicate to the bdev layer that the module is done initializing.
 *
 * To be called once during module_init or asynchronously after
 * an asynchronous operation required for module initialization is completed.
 * To be called once after an asynchronous operation required for module initialization is
 * completed. If module->async_init is false, the module must not call this function.
 *
 * \param module Pointer to the module completing the initialization.
 */
+1 −0
Original line number Diff line number Diff line
@@ -1583,6 +1583,7 @@ bdev_module_action_done(struct spdk_bdev_module *module)
void
spdk_bdev_module_init_done(struct spdk_bdev_module *module)
{
	assert(module->async_init);
	bdev_module_action_done(module);
}