Commit 8482b47d authored by Changpeng Liu's avatar Changpeng Liu Committed by Jim Harris
Browse files

nvme: initialize namespace capability flags with correct order



The extended LBA format flag should be initialized after namespace
capability flag.

Change-Id: Iad479b454bb4e31120c17d40ae23937a099c6f8f
Signed-off-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
parent 360d3813
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -74,6 +74,8 @@ int nvme_ns_identify_update(struct spdk_nvme_ns *ns)
		return 0;
	}

	ns->flags = 0x0000;

	ns->sector_size = 1 << nsdata->lbaf[nsdata->flbas.format].lbads;
	ns->extended_lba_size = ns->sector_size;

@@ -86,8 +88,6 @@ int nvme_ns_identify_update(struct spdk_nvme_ns *ns)
	ns->sectors_per_max_io = spdk_nvme_ns_get_max_io_xfer_size(ns) / ns->extended_lba_size;
	ns->sectors_per_stripe = ns->stripe_size / ns->sector_size;

	ns->flags = 0x0000;

	if (ns->ctrlr->cdata.oncs.dsm) {
		ns->flags |= SPDK_NVME_NS_DEALLOCATE_SUPPORTED;
	}