From 38d3138ee579aafd058f0f16cb877dd571dae5e8 Mon Sep 17 00:00:00 2001 From: Wojciech Malikowski Date: Thu, 30 Jan 2020 06:28:34 -0500 Subject: [PATCH] lib/ftl: Remove thread checks for zone reset operation Since zone reset is private for core thread it will be always issued from core thread. Change-Id: Ice03d339cb59548690ccf8f48d7c1606ee408a59 Signed-off-by: Wojciech Malikowski Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/552 Tested-by: SPDK CI Jenkins Reviewed-by: Konrad Sztyber Reviewed-by: Jim Harris Reviewed-by: Shuhei Matsumoto --- lib/ftl/ftl_core.c | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/lib/ftl/ftl_core.c b/lib/ftl/ftl_core.c index 802005bfb..6c6272641 100644 --- a/lib/ftl/ftl_core.c +++ b/lib/ftl/ftl_core.c @@ -400,27 +400,6 @@ ftl_get_io_channel(const struct spdk_ftl_dev *dev) return NULL; } -static int ftl_io_erase(struct ftl_io *io); - -static void -_ftl_io_erase(void *ctx) -{ - ftl_io_erase((struct ftl_io *)ctx); -} - -static int -ftl_io_erase(struct ftl_io *io) -{ - struct spdk_ftl_dev *dev = io->dev; - - if (ftl_check_core_thread(dev)) { - return ftl_submit_erase(io); - } - - spdk_thread_send_msg(ftl_get_core_thread(dev), _ftl_io_erase, io); - return 0; -} - static void ftl_erase_fail(struct ftl_io *io, int status) { @@ -479,7 +458,7 @@ ftl_band_erase(struct ftl_band *band) zone->busy = true; io->addr.offset = zone->info.zone_id; - rc = ftl_io_erase(io); + rc = ftl_submit_erase(io); if (rc) { zone->busy = false; assert(0);