diff --git a/module/bdev/nvme/bdev_nvme.c b/module/bdev/nvme/bdev_nvme.c index 0e4127c98..ddde2d21b 100644 --- a/module/bdev/nvme/bdev_nvme.c +++ b/module/bdev/nvme/bdev_nvme.c @@ -522,7 +522,7 @@ bdev_nvme_reset_io_complete(struct nvme_bdev_ctrlr *nvme_bdev_ctrlr, static void _bdev_nvme_reset_complete(struct nvme_bdev_ctrlr *nvme_bdev_ctrlr, int rc) { - struct nvme_bdev_ctrlr_trid *curr_trid; + struct nvme_ctrlr_trid *curr_trid; struct spdk_bdev_io *bdev_io = nvme_bdev_ctrlr->reset_bdev_io; nvme_bdev_ctrlr->reset_bdev_io = NULL; @@ -672,7 +672,7 @@ bdev_nvme_reset(struct nvme_ctrlr_channel *ctrlr_ch, struct spdk_bdev_io *bdev_i static int _bdev_nvme_failover_start(struct nvme_bdev_ctrlr *nvme_bdev_ctrlr, bool remove) { - struct nvme_bdev_ctrlr_trid *curr_trid = NULL, *next_trid = NULL; + struct nvme_ctrlr_trid *curr_trid = NULL, *next_trid = NULL; int rc; pthread_mutex_lock(&nvme_bdev_ctrlr->mutex); @@ -1824,7 +1824,7 @@ nvme_bdev_ctrlr_create(struct spdk_nvme_ctrlr *ctrlr, struct nvme_async_probe_ctx *ctx) { struct nvme_bdev_ctrlr *nvme_bdev_ctrlr; - struct nvme_bdev_ctrlr_trid *trid_entry; + struct nvme_ctrlr_trid *trid_entry; uint32_t i, num_ns; int rc; @@ -2157,7 +2157,7 @@ bdev_nvme_compare_trids(struct nvme_bdev_ctrlr *nvme_bdev_ctrlr, struct spdk_nvme_ctrlr *new_ctrlr, struct spdk_nvme_transport_id *trid) { - struct nvme_bdev_ctrlr_trid *tmp_trid; + struct nvme_ctrlr_trid *tmp_trid; if (trid->trtype == SPDK_NVME_TRANSPORT_PCIE) { SPDK_ERRLOG("PCIe failover is not supported.\n"); @@ -2219,7 +2219,7 @@ static int _bdev_nvme_add_secondary_trid(struct nvme_bdev_ctrlr *nvme_bdev_ctrlr, struct spdk_nvme_transport_id *trid) { - struct nvme_bdev_ctrlr_trid *new_trid, *tmp_trid; + struct nvme_ctrlr_trid *new_trid, *tmp_trid; new_trid = calloc(1, sizeof(*new_trid)); if (new_trid == NULL) { @@ -2409,7 +2409,7 @@ static int bdev_nvme_delete_secondary_trid(struct nvme_bdev_ctrlr *nvme_bdev_ctrlr, const struct spdk_nvme_transport_id *trid) { - struct nvme_bdev_ctrlr_trid *ctrlr_trid, *tmp_trid; + struct nvme_ctrlr_trid *ctrlr_trid, *tmp_trid; if (!spdk_nvme_transport_id_compare(trid, nvme_bdev_ctrlr->connected_trid)) { return -EBUSY; @@ -2430,7 +2430,7 @@ int bdev_nvme_delete(const char *name, const struct spdk_nvme_transport_id *trid) { struct nvme_bdev_ctrlr *nvme_bdev_ctrlr; - struct nvme_bdev_ctrlr_trid *ctrlr_trid; + struct nvme_ctrlr_trid *ctrlr_trid; if (name == NULL) { return -EINVAL; diff --git a/module/bdev/nvme/common.c b/module/bdev/nvme/common.c index 318b75d5d..0b904adc7 100644 --- a/module/bdev/nvme/common.c +++ b/module/bdev/nvme/common.c @@ -115,7 +115,7 @@ nvme_bdev_dump_trid_json(const struct spdk_nvme_transport_id *trid, struct spdk_ void nvme_bdev_ctrlr_delete(struct nvme_bdev_ctrlr *nvme_bdev_ctrlr) { - struct nvme_bdev_ctrlr_trid *trid, *tmp_trid; + struct nvme_ctrlr_trid *trid, *tmp_trid; uint32_t i; if (nvme_bdev_ctrlr->opal_dev) { diff --git a/module/bdev/nvme/common.h b/module/bdev/nvme/common.h index 88486b0c4..e9e12a6b7 100644 --- a/module/bdev/nvme/common.h +++ b/module/bdev/nvme/common.h @@ -70,9 +70,9 @@ struct nvme_ns { struct ocssd_bdev_ctrlr; -struct nvme_bdev_ctrlr_trid { +struct nvme_ctrlr_trid { struct spdk_nvme_transport_id trid; - TAILQ_ENTRY(nvme_bdev_ctrlr_trid) link; + TAILQ_ENTRY(nvme_ctrlr_trid) link; bool is_failed; }; @@ -112,7 +112,7 @@ struct nvme_bdev_ctrlr { /** linked list pointer for device list */ TAILQ_ENTRY(nvme_bdev_ctrlr) tailq; - TAILQ_HEAD(, nvme_bdev_ctrlr_trid) trids; + TAILQ_HEAD(, nvme_ctrlr_trid) trids; pthread_mutex_t mutex; }; diff --git a/test/unit/lib/bdev/nvme/bdev_nvme.c/bdev_nvme_ut.c b/test/unit/lib/bdev/nvme/bdev_nvme.c/bdev_nvme_ut.c index 730d85e39..509c2bc40 100644 --- a/test/unit/lib/bdev/nvme/bdev_nvme.c/bdev_nvme_ut.c +++ b/test/unit/lib/bdev/nvme/bdev_nvme.c/bdev_nvme_ut.c @@ -1028,7 +1028,7 @@ test_reset_ctrlr(void) struct spdk_nvme_transport_id trid = {}; struct spdk_nvme_ctrlr ctrlr = {}; struct nvme_bdev_ctrlr *nvme_bdev_ctrlr = NULL; - struct nvme_bdev_ctrlr_trid *curr_trid; + struct nvme_ctrlr_trid *curr_trid; struct spdk_io_channel *ch1, *ch2; struct nvme_ctrlr_channel *ctrlr_ch1, *ctrlr_ch2; int rc; @@ -1211,7 +1211,7 @@ test_failover_ctrlr(void) struct spdk_nvme_transport_id trid1 = {}, trid2 = {}; struct spdk_nvme_ctrlr ctrlr = {}; struct nvme_bdev_ctrlr *nvme_bdev_ctrlr = NULL; - struct nvme_bdev_ctrlr_trid *curr_trid, *next_trid; + struct nvme_ctrlr_trid *curr_trid, *next_trid; struct spdk_io_channel *ch1, *ch2; int rc; @@ -1929,7 +1929,7 @@ test_remove_trid(void) struct spdk_nvme_transport_id trid1 = {}, trid2 = {}, trid3 = {}; struct spdk_nvme_ctrlr ctrlr = {}; struct nvme_bdev_ctrlr *nvme_bdev_ctrlr = NULL; - struct nvme_bdev_ctrlr_trid *ctrid; + struct nvme_ctrlr_trid *ctrid; int rc; ut_init_trid(&trid1); diff --git a/test/unit/lib/bdev/nvme/bdev_ocssd.c/bdev_ocssd_ut.c b/test/unit/lib/bdev/nvme/bdev_ocssd.c/bdev_ocssd_ut.c index 04e98ed37..aa1ef81c2 100644 --- a/test/unit/lib/bdev/nvme/bdev_ocssd.c/bdev_ocssd_ut.c +++ b/test/unit/lib/bdev/nvme/bdev_ocssd.c/bdev_ocssd_ut.c @@ -202,7 +202,7 @@ create_nvme_bdev_controller(const struct spdk_nvme_transport_id *trid, const cha { struct spdk_nvme_ctrlr *ctrlr; struct nvme_bdev_ctrlr *nvme_bdev_ctrlr; - struct nvme_bdev_ctrlr_trid *trid_entry; + struct nvme_ctrlr_trid *trid_entry; uint32_t nsid; int rc; @@ -220,7 +220,7 @@ create_nvme_bdev_controller(const struct spdk_nvme_transport_id *trid, const cha nvme_bdev_ctrlr->namespaces = calloc(ctrlr->ns_count, sizeof(struct nvme_ns *)); SPDK_CU_ASSERT_FATAL(nvme_bdev_ctrlr->namespaces != NULL); - trid_entry = calloc(1, sizeof(struct nvme_bdev_ctrlr_trid)); + trid_entry = calloc(1, sizeof(struct nvme_ctrlr_trid)); SPDK_CU_ASSERT_FATAL(trid_entry != NULL); trid_entry->trid = *trid;