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 <wojciech.malikowski@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/552
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
Wojciech Malikowski 2020-01-30 06:28:34 -05:00 committed by Tomasz Zawadzki
parent b75b3553aa
commit 38d3138ee5

View File

@ -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);