summaryrefslogtreecommitdiffstats
path: root/hw/block/nvme-ns.h
diff options
context:
space:
mode:
Diffstat (limited to 'hw/block/nvme-ns.h')
-rw-r--r--hw/block/nvme-ns.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/block/nvme-ns.h b/hw/block/nvme-ns.h
index e2f53d9996..07e1688080 100644
--- a/hw/block/nvme-ns.h
+++ b/hw/block/nvme-ns.h
@@ -138,7 +138,7 @@ static inline bool nvme_ns_ext(NvmeNamespace *ns)
/* calculate the number of LBAs that the namespace can accomodate */
static inline uint64_t nvme_ns_nlbas(NvmeNamespace *ns)
{
- if (ns->params.ms) {
+ if (nvme_msize(ns)) {
return ns->size / (nvme_lsize(ns) + nvme_msize(ns));
}
return ns->size >> nvme_ns_lbads(ns);