diff --git a/lib/nvmf/subsystem.c b/lib/nvmf/subsystem.c index 621566a25..668c7664e 100644 --- a/lib/nvmf/subsystem.c +++ b/lib/nvmf/subsystem.c @@ -323,7 +323,6 @@ spdk_nvmf_subsystem_create(struct spdk_nvmf_tgt *tgt, MODEL_NUMBER_DEFAULT); tgt->subsystems[sid] = subsystem; - nvmf_update_discovery_log(tgt, NULL); return subsystem; } @@ -403,7 +402,6 @@ _nvmf_subsystem_destroy(struct spdk_nvmf_subsystem *subsystem) free(subsystem->ana_group); subsystem->tgt->subsystems[subsystem->id] = NULL; - nvmf_update_discovery_log(subsystem->tgt, NULL); pthread_mutex_destroy(&subsystem->mutex); diff --git a/test/unit/lib/nvmf/ctrlr_discovery.c/ctrlr_discovery_ut.c b/test/unit/lib/nvmf/ctrlr_discovery.c/ctrlr_discovery_ut.c index 095bc0943..fb29e1917 100644 --- a/test/unit/lib/nvmf/ctrlr_discovery.c/ctrlr_discovery_ut.c +++ b/test/unit/lib/nvmf/ctrlr_discovery.c/ctrlr_discovery_ut.c @@ -324,14 +324,14 @@ test_discovery_log(void) disc_log = (struct spdk_nvmf_discovery_log_page *)buffer; nvmf_get_discovery_log_page(&tgt, "nqn.2016-06.io.spdk:host1", &iov, 1, 0, sizeof(disc_log->genctr), &trid); - CU_ASSERT(disc_log->genctr == 2); /* one added subsystem and listener */ + CU_ASSERT(disc_log->genctr == 1); /* one added subsystem and listener */ /* Get only the header, no entries */ memset(buffer, 0xCC, sizeof(buffer)); disc_log = (struct spdk_nvmf_discovery_log_page *)buffer; nvmf_get_discovery_log_page(&tgt, "nqn.2016-06.io.spdk:host1", &iov, 1, 0, sizeof(*disc_log), &trid); - CU_ASSERT(disc_log->genctr == 2); + CU_ASSERT(disc_log->genctr == 1); CU_ASSERT(disc_log->numrec == 1); /* Offset 0, exact size match */