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:
parent
dcc2a96af9
commit
789055cad4
@ -1769,7 +1769,7 @@ nvme_ctrlr_populate_namespaces(struct nvme_ctrlr *nvme_ctrlr,
|
|||||||
nvme_ns = nvme_ctrlr->namespaces[i];
|
nvme_ns = nvme_ctrlr->namespaces[i];
|
||||||
ns_is_active = spdk_nvme_ctrlr_is_active_ns(ctrlr, nsid);
|
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 is still there but attributes may have changed */
|
||||||
ns = spdk_nvme_ctrlr_get_ns(ctrlr, nsid);
|
ns = spdk_nvme_ctrlr_get_ns(ctrlr, nsid);
|
||||||
num_sectors = spdk_nvme_ns_get_num_sectors(ns);
|
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) {
|
if (!nvme_ns->populated && ns_is_active) {
|
||||||
nvme_ns->id = nsid;
|
nvme_ns->id = nsid;
|
||||||
nvme_ns->ctrlr = nvme_ctrlr;
|
nvme_ns->ctrlr = nvme_ctrlr;
|
||||||
nvme_ns->type = NVME_NS_STANDARD;
|
|
||||||
|
|
||||||
nvme_ns->bdev = NULL;
|
nvme_ns->bdev = NULL;
|
||||||
|
|
||||||
@ -2384,10 +2383,6 @@ nvme_ctrlr_populate_namespaces_done(struct nvme_ctrlr *nvme_ctrlr,
|
|||||||
}
|
}
|
||||||
assert(nvme_ns->id == nsid);
|
assert(nvme_ns->id == nsid);
|
||||||
nvme_bdev = nvme_ns->bdev;
|
nvme_bdev = nvme_ns->bdev;
|
||||||
if (nvme_bdev == NULL) {
|
|
||||||
assert(nvme_ns->type == NVME_NS_OCSSD);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (j < ctx->count) {
|
if (j < ctx->count) {
|
||||||
ctx->names[j] = nvme_bdev->disk.name;
|
ctx->names[j] = nvme_bdev->disk.name;
|
||||||
j++;
|
j++;
|
||||||
|
@ -65,15 +65,8 @@ struct nvme_async_probe_ctx {
|
|||||||
bool namespaces_populated;
|
bool namespaces_populated;
|
||||||
};
|
};
|
||||||
|
|
||||||
enum nvme_ns_type {
|
|
||||||
NVME_NS_UNKNOWN = 0,
|
|
||||||
NVME_NS_STANDARD = 1,
|
|
||||||
NVME_NS_OCSSD = 2,
|
|
||||||
};
|
|
||||||
|
|
||||||
struct nvme_ns {
|
struct nvme_ns {
|
||||||
uint32_t id;
|
uint32_t id;
|
||||||
enum nvme_ns_type type;
|
|
||||||
/** Marks whether this data structure has its bdevs
|
/** Marks whether this data structure has its bdevs
|
||||||
* populated for the associated namespace. It is used
|
* populated for the associated namespace. It is used
|
||||||
* to keep track if we need manage the populated
|
* to keep track if we need manage the populated
|
||||||
|
Loading…
Reference in New Issue
Block a user