bdev/nvme: Remove namespace types

There's only one type now.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I8fbf330797e772b1c45a04970c95bf4894c26639
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9348
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Ben Walker 2021-08-31 14:20:55 -07:00 committed by Tomasz Zawadzki
parent dcc2a96af9
commit 789055cad4
2 changed files with 1 additions and 13 deletions

View File

@ -1769,7 +1769,7 @@ nvme_ctrlr_populate_namespaces(struct nvme_ctrlr *nvme_ctrlr,
nvme_ns = nvme_ctrlr->namespaces[i];
ns_is_active = spdk_nvme_ctrlr_is_active_ns(ctrlr, nsid);
if (nvme_ns->populated && ns_is_active && nvme_ns->type == NVME_NS_STANDARD) {
if (nvme_ns->populated && ns_is_active) {
/* NS is still there but attributes may have changed */
ns = spdk_nvme_ctrlr_get_ns(ctrlr, nsid);
num_sectors = spdk_nvme_ns_get_num_sectors(ns);
@ -1792,7 +1792,6 @@ nvme_ctrlr_populate_namespaces(struct nvme_ctrlr *nvme_ctrlr,
if (!nvme_ns->populated && ns_is_active) {
nvme_ns->id = nsid;
nvme_ns->ctrlr = nvme_ctrlr;
nvme_ns->type = NVME_NS_STANDARD;
nvme_ns->bdev = NULL;
@ -2384,10 +2383,6 @@ nvme_ctrlr_populate_namespaces_done(struct nvme_ctrlr *nvme_ctrlr,
}
assert(nvme_ns->id == nsid);
nvme_bdev = nvme_ns->bdev;
if (nvme_bdev == NULL) {
assert(nvme_ns->type == NVME_NS_OCSSD);
continue;
}
if (j < ctx->count) {
ctx->names[j] = nvme_bdev->disk.name;
j++;

View File

@ -65,15 +65,8 @@ struct nvme_async_probe_ctx {
bool namespaces_populated;
};
enum nvme_ns_type {
NVME_NS_UNKNOWN = 0,
NVME_NS_STANDARD = 1,
NVME_NS_OCSSD = 2,
};
struct nvme_ns {
uint32_t id;
enum nvme_ns_type type;
/** Marks whether this data structure has its bdevs
* populated for the associated namespace. It is used
* to keep track if we need manage the populated