From ec3c0bb2f01a0a19e50dfd7ad31b8405820b2f93 Mon Sep 17 00:00:00 2001 From: Dariusz Stojaczyk Date: Wed, 8 Nov 2017 15:30:51 +0100 Subject: [PATCH] Revert "fio_plugin: allow stopping poller after it's thread has been stopped" Now that there's a fio_thread at the time of calling spdk_bdev_finish, this work-around is no longer necessary. This reverts commit ae0f518e4ff841de9835b8994f17542c980df0a5. Change-Id: I416ff69552ab863b6722931c9ef086f119439ba5 Signed-off-by: Dariusz Stojaczyk Reviewed-on: https://review.gerrithub.io/386248 Reviewed-by: Ben Walker Tested-by: SPDK Automated Test System Reviewed-by: Jim Harris Reviewed-by: Daniel Verkamp --- examples/bdev/fio_plugin/fio_plugin.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/examples/bdev/fio_plugin/fio_plugin.c b/examples/bdev/fio_plugin/fio_plugin.c index 5133d2086..10f4914fd 100644 --- a/examples/bdev/fio_plugin/fio_plugin.c +++ b/examples/bdev/fio_plugin/fio_plugin.c @@ -164,10 +164,13 @@ spdk_fio_stop_poller(struct spdk_bdev_poller **ppoller) fio_poller = *(struct spdk_fio_poller **)ppoller; fio_thread = g_thread; - if (fio_thread) { - TAILQ_REMOVE(&fio_thread->pollers, fio_poller, link); + if (!fio_thread) { + SPDK_ERRLOG("Expected local thread to be initialized, but it was not.\n"); + return; } + TAILQ_REMOVE(&fio_thread->pollers, fio_poller, link); + free(fio_poller); *ppoller = NULL; }