copy: Move asynchronous module init to event_copy
This removes the last use of the event framework from the copy_engine library. Change-Id: I9b8788430249766e0b3bbec591822e2c1bb77792 Signed-off-by: Ben Walker <benjamin.walker@intel.com> Reviewed-on: https://review.gerrithub.io/365724 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
d57bf4cc82
commit
4d8c07901f
@ -46,7 +46,7 @@ struct spdk_io_channel;
|
||||
|
||||
struct spdk_copy_task;
|
||||
|
||||
void spdk_copy_engine_initialize(void);
|
||||
int spdk_copy_engine_initialize(void);
|
||||
int spdk_copy_engine_finish(void);
|
||||
|
||||
struct spdk_io_channel *spdk_copy_engine_get_io_channel(void);
|
||||
|
@ -39,8 +39,6 @@
|
||||
#include "spdk/log.h"
|
||||
#include "spdk/io_channel.h"
|
||||
|
||||
#include "spdk_internal/event.h"
|
||||
|
||||
static size_t g_max_copy_module_size = 0;
|
||||
|
||||
static struct spdk_copy_engine *hw_copy_engine = NULL;
|
||||
@ -237,7 +235,7 @@ spdk_copy_engine_module_finish(void)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
int
|
||||
spdk_copy_engine_initialize(void)
|
||||
{
|
||||
spdk_copy_engine_module_initialize();
|
||||
@ -248,7 +246,7 @@ spdk_copy_engine_initialize(void)
|
||||
spdk_io_device_register(&spdk_copy_module_list, copy_create_cb, copy_destroy_cb,
|
||||
sizeof(struct copy_io_channel));
|
||||
|
||||
spdk_subsystem_init_next(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -37,5 +37,22 @@
|
||||
|
||||
#include "spdk_internal/event.h"
|
||||
|
||||
SPDK_SUBSYSTEM_REGISTER(copy, spdk_copy_engine_initialize, spdk_copy_engine_finish, NULL)
|
||||
static void
|
||||
spdk_copy_engine_subsystem_initialize(void)
|
||||
{
|
||||
int rc;
|
||||
|
||||
rc = spdk_copy_engine_initialize();
|
||||
|
||||
spdk_subsystem_init_next(rc);
|
||||
}
|
||||
|
||||
static int
|
||||
spdk_copy_engine_subsystem_finish(void)
|
||||
{
|
||||
return spdk_copy_engine_finish();
|
||||
}
|
||||
|
||||
SPDK_SUBSYSTEM_REGISTER(copy, spdk_copy_engine_subsystem_initialize,
|
||||
spdk_copy_engine_subsystem_finish, NULL)
|
||||
SPDK_SUBSYSTEM_DEPEND(bdev, copy)
|
||||
|
Loading…
Reference in New Issue
Block a user