bdevperf: Use SPDK event to call bdevperf_target_gone() on the correct core
Fix the issue that target->run_timer and target->reset_timer needed to be called on the core which runs the target. Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: Ia36681ac51a46f272e5738d0ae63838939e71e28 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478712 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
aa3df27439
commit
fd9c6a3d66
@ -283,9 +283,9 @@ bdevperf_free_targets(void)
|
||||
}
|
||||
|
||||
static void
|
||||
bdevperf_target_gone(void *arg)
|
||||
_target_gone(void *arg1, void *arg2)
|
||||
{
|
||||
struct io_target *target = arg;
|
||||
struct io_target *target = arg1;
|
||||
|
||||
spdk_poller_unregister(&target->run_timer);
|
||||
if (g_reset) {
|
||||
@ -295,6 +295,16 @@ bdevperf_target_gone(void *arg)
|
||||
target->is_draining = true;
|
||||
}
|
||||
|
||||
static void
|
||||
bdevperf_target_gone(void *arg)
|
||||
{
|
||||
struct io_target *target = arg;
|
||||
struct spdk_event *event;
|
||||
|
||||
event = spdk_event_allocate(target->lcore, _target_gone, target, NULL);
|
||||
spdk_event_call(event);
|
||||
}
|
||||
|
||||
static int
|
||||
bdevperf_construct_target(struct spdk_bdev *bdev)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user