Commit 61532e08 authored by Shuhei Matsumoto's avatar Shuhei Matsumoto Committed by Jim Harris
Browse files

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: default avatarShuhei 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: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarPaul Luse <paul.e.luse@intel.com>
Reviewed-by: default avatarAleksey Marchuk <alexeymar@mellanox.com>
parent 1a0144b7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
+4 −4
Original line number Diff line number Diff line
@@ -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
+1 −1
Original line number Diff line number Diff line
@@ -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,