bdev/nvme: Rename nvme_bdev_ctrlr_do_destruct() by nvme_bdev_ctrlr_unregister()

Probably nvme_bdev_ctrlr_unregister() is more appropriate name.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I3a0d3622c084df909e5daeb548726cd9bd826ad8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7045
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This commit is contained in:
Shuhei Matsumoto 2021-03-26 21:57:46 +09:00 committed by Jim Harris
parent 1a0144b7c4
commit 61532e08ed
3 changed files with 6 additions and 6 deletions

View File

@ -412,7 +412,7 @@ _bdev_nvme_check_pending_destruct(struct spdk_io_channel_iter *i, int status)
assert(nvme_bdev_ctrlr->ref == 0 && nvme_bdev_ctrlr->destruct);
pthread_mutex_unlock(&nvme_bdev_ctrlr->mutex);
spdk_thread_send_msg(nvme_bdev_ctrlr->thread, nvme_bdev_ctrlr_do_destruct,
spdk_thread_send_msg(nvme_bdev_ctrlr->thread, nvme_bdev_ctrlr_unregister,
nvme_bdev_ctrlr);
} else {
pthread_mutex_unlock(&nvme_bdev_ctrlr->mutex);

View File

@ -113,7 +113,7 @@ nvme_bdev_dump_trid_json(const struct spdk_nvme_transport_id *trid, struct spdk_
}
static void
nvme_bdev_unregister_cb(void *io_device)
nvme_bdev_ctrlr_unregister_cb(void *io_device)
{
struct nvme_bdev_ctrlr *nvme_bdev_ctrlr = io_device;
struct nvme_bdev_ctrlr_trid *trid, *tmp_trid;
@ -160,11 +160,11 @@ nvme_bdev_unregister_cb(void *io_device)
}
void
nvme_bdev_ctrlr_do_destruct(void *ctx)
nvme_bdev_ctrlr_unregister(void *ctx)
{
struct nvme_bdev_ctrlr *nvme_bdev_ctrlr = ctx;
spdk_io_device_unregister(nvme_bdev_ctrlr, nvme_bdev_unregister_cb);
spdk_io_device_unregister(nvme_bdev_ctrlr, nvme_bdev_ctrlr_unregister_cb);
}
void
@ -183,7 +183,7 @@ nvme_bdev_ctrlr_destruct(struct nvme_bdev_ctrlr *nvme_bdev_ctrlr)
pthread_mutex_unlock(&nvme_bdev_ctrlr->mutex);
nvme_bdev_ctrlr_do_destruct(nvme_bdev_ctrlr);
nvme_bdev_ctrlr_unregister(nvme_bdev_ctrlr);
}
void

View File

@ -175,7 +175,7 @@ void nvme_bdev_dump_trid_json(const struct spdk_nvme_transport_id *trid,
struct spdk_json_write_ctx *w);
void nvme_bdev_ctrlr_destruct(struct nvme_bdev_ctrlr *nvme_bdev_ctrlr);
void nvme_bdev_ctrlr_do_destruct(void *ctx);
void nvme_bdev_ctrlr_unregister(void *ctx);
static inline bool
bdev_nvme_find_io_path(struct nvme_bdev *nbdev, struct nvme_io_channel *nvme_ch,