nvme: Remove nvme_ns_update

In the one place this was called, we can call nvme_ns_construct
instead. There's no harm in re-fetching the identify pages.

Change-Id: I91292ff9650bdc7edd5588a05837b671dcac1922
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10102
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
Ben Walker 2021-12-15 10:17:10 -07:00 committed by Tomasz Zawadzki
parent b9cac1d4e7
commit fca4262987
4 changed files with 1 additions and 21 deletions

View File

@ -2972,15 +2972,7 @@ nvme_ctrlr_update_namespaces(struct spdk_nvme_ctrlr *ctrlr)
nsdata = &ns->nsdata;
ns_is_active = spdk_nvme_ctrlr_is_active_ns(ctrlr, nsid);
if (nsdata->ncap && ns_is_active) {
NVME_CTRLR_DEBUGLOG(ctrlr, "Namespace %u was updated\n", nsid);
if (nvme_ns_update(ns) != 0) {
NVME_CTRLR_ERRLOG(ctrlr, "Failed to update active NS %u\n", nsid);
continue;
}
}
if ((nsdata->ncap == 0) && ns_is_active) {
if (ns_is_active) {
NVME_CTRLR_DEBUGLOG(ctrlr, "Namespace %u was added\n", nsid);
if (nvme_ctrlr_construct_namespace(ctrlr, nsid) != 0) {
continue;

View File

@ -1211,7 +1211,6 @@ bool nvme_ns_has_supported_iocs_specific_data(struct spdk_nvme_ns *ns);
int nvme_ns_construct(struct spdk_nvme_ns *ns, uint32_t id,
struct spdk_nvme_ctrlr *ctrlr);
void nvme_ns_destruct(struct spdk_nvme_ns *ns);
int nvme_ns_update(struct spdk_nvme_ns *ns);
int nvme_ns_cmd_zone_append_with_md(struct spdk_nvme_ns *ns, struct spdk_nvme_qpair *qpair,
void *buffer, void *metadata, uint64_t zslba,
uint32_t lba_count, spdk_nvme_cmd_cb cb_fn, void *cb_arg,

View File

@ -580,8 +580,3 @@ void nvme_ns_destruct(struct spdk_nvme_ns *ns)
ns->flags = 0;
ns->csi = SPDK_NVME_CSI_NVM;
}
int nvme_ns_update(struct spdk_nvme_ns *ns)
{
return nvme_ctrlr_identify_ns(ns);
}

View File

@ -686,12 +686,6 @@ nvme_ns_construct(struct spdk_nvme_ns *ns, uint32_t id,
return 0;
}
int
nvme_ns_update(struct spdk_nvme_ns *ns)
{
return 0;
}
void
spdk_pci_device_detach(struct spdk_pci_device *device)
{