nbd: Remove extra event on shutdown

nbd_start(), nbd_poll(), and nbd_stop() will all be called
on the same core, so the poller unregister will complete
synchronously.

Change-Id: I4f83f3821102277704422ed63d4cde424324e0a4
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/387686
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
Ben Walker 2017-11-15 11:06:15 -07:00
parent 4927c20681
commit 03bb015cda

View File

@ -49,20 +49,13 @@ static char *g_nbd_name = "/dev/nbd0";
#include "../common.c"
static void
nbd_stop(void *arg1, void *arg2)
{
spdk_nbd_stop(g_nbd_disk);
spdk_app_stop(0);
}
static void
nbd_shutdown(void)
{
struct spdk_event *stop_event;
spdk_poller_unregister(&g_nbd_poller, NULL);
stop_event = spdk_event_allocate(spdk_env_get_current_core(), nbd_stop, NULL, NULL);
spdk_poller_unregister(&g_nbd_poller, stop_event);
spdk_nbd_stop(g_nbd_disk);
spdk_app_stop(0);
}
static void