bdev/nvme: Rename common remove functions
Rename common remove functions so that they align with naming convention. Signed-off-by: Maciej Szwed <maciej.szwed@intel.com> Change-Id: I8200c2f916ff45e03fb097c5f78eff0782b96c86 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/474248 Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
b56d8100b6
commit
b5b6a1ce81
@ -260,7 +260,7 @@ bdev_nvme_destruct(void *ctx)
|
||||
free(nvme_disk);
|
||||
if (nvme_bdev_ctrlr->ref == 0 && nvme_bdev_ctrlr->destruct) {
|
||||
pthread_mutex_unlock(&g_bdev_nvme_mutex);
|
||||
bdev_nvme_ctrlr_destruct(nvme_bdev_ctrlr);
|
||||
nvme_bdev_ctrlr_destruct(nvme_bdev_ctrlr);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1241,7 +1241,7 @@ remove_cb(void *cb_ctx, struct spdk_nvme_ctrlr *ctrlr)
|
||||
nvme_bdev_ctrlr->destruct = true;
|
||||
if (nvme_bdev_ctrlr->ref == 0) {
|
||||
pthread_mutex_unlock(&g_bdev_nvme_mutex);
|
||||
bdev_nvme_ctrlr_destruct(nvme_bdev_ctrlr);
|
||||
nvme_bdev_ctrlr_destruct(nvme_bdev_ctrlr);
|
||||
} else {
|
||||
pthread_mutex_unlock(&g_bdev_nvme_mutex);
|
||||
}
|
||||
@ -1776,7 +1776,7 @@ bdev_nvme_library_fini(void)
|
||||
|
||||
nvme_bdev_ctrlr->destruct = true;
|
||||
pthread_mutex_unlock(&g_bdev_nvme_mutex);
|
||||
bdev_nvme_ctrlr_destruct(nvme_bdev_ctrlr);
|
||||
nvme_bdev_ctrlr_destruct(nvme_bdev_ctrlr);
|
||||
pthread_mutex_lock(&g_bdev_nvme_mutex);
|
||||
}
|
||||
pthread_mutex_unlock(&g_bdev_nvme_mutex);
|
||||
|
@ -111,7 +111,7 @@ nvme_bdev_dump_trid_json(struct spdk_nvme_transport_id *trid, struct spdk_json_w
|
||||
}
|
||||
|
||||
static void
|
||||
bdev_nvme_unregister_cb(void *io_device)
|
||||
nvme_bdev_unregister_cb(void *io_device)
|
||||
{
|
||||
struct nvme_bdev_ctrlr *nvme_bdev_ctrlr = io_device;
|
||||
uint32_t i;
|
||||
@ -130,7 +130,7 @@ bdev_nvme_unregister_cb(void *io_device)
|
||||
}
|
||||
|
||||
void
|
||||
bdev_nvme_ctrlr_destruct(struct nvme_bdev_ctrlr *nvme_bdev_ctrlr)
|
||||
nvme_bdev_ctrlr_destruct(struct nvme_bdev_ctrlr *nvme_bdev_ctrlr)
|
||||
{
|
||||
assert(nvme_bdev_ctrlr->destruct);
|
||||
if (nvme_bdev_ctrlr->opal_dev) {
|
||||
@ -143,5 +143,5 @@ bdev_nvme_ctrlr_destruct(struct nvme_bdev_ctrlr *nvme_bdev_ctrlr)
|
||||
nvme_bdev_ctrlr->opal_dev = NULL;
|
||||
}
|
||||
|
||||
spdk_io_device_unregister(nvme_bdev_ctrlr, bdev_nvme_unregister_cb);
|
||||
spdk_io_device_unregister(nvme_bdev_ctrlr, nvme_bdev_unregister_cb);
|
||||
}
|
||||
|
@ -120,6 +120,6 @@ struct nvme_bdev_ctrlr *nvme_bdev_next_ctrlr(struct nvme_bdev_ctrlr *prev);
|
||||
void nvme_bdev_dump_trid_json(struct spdk_nvme_transport_id *trid,
|
||||
struct spdk_json_write_ctx *w);
|
||||
|
||||
void bdev_nvme_ctrlr_destruct(struct nvme_bdev_ctrlr *nvme_bdev_ctrlr);
|
||||
void nvme_bdev_ctrlr_destruct(struct nvme_bdev_ctrlr *nvme_bdev_ctrlr);
|
||||
|
||||
#endif /* SPDK_COMMON_BDEV_NVME_H */
|
||||
|
Loading…
Reference in New Issue
Block a user