diff options
author | Klaus Jensen <k.jensen@samsung.com> | 2021-04-13 21:51:30 +0200 |
---|---|---|
committer | Klaus Jensen <k.jensen@samsung.com> | 2021-05-17 09:18:59 +0200 |
commit | 3ef73f9462a0c142dce80ce5b4ff8789b39f2f64 (patch) | |
tree | 5d5f01cdee96e0ae53ad89fab9e77222eeda7639 /hw/block/nvme-ns.c | |
parent | 6146f3dd35cd71b4ac594b2e4a86c4bb3af52b09 (diff) |
hw/block/nvme: add metadata offset helper
Add an nvme_moff() helper.
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
Reviewed-by: Keith Busch <kbusch@kernel.org>
Diffstat (limited to 'hw/block/nvme-ns.c')
-rw-r--r-- | hw/block/nvme-ns.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/block/nvme-ns.c b/hw/block/nvme-ns.c index b9369460b9..b25838ac4f 100644 --- a/hw/block/nvme-ns.c +++ b/hw/block/nvme-ns.c @@ -42,7 +42,7 @@ void nvme_ns_init_format(NvmeNamespace *ns) id_ns->ncap = id_ns->nsze; id_ns->nuse = id_ns->ncap; - ns->mdata_offset = (int64_t)nlbas << ns->lbaf.ds; + ns->moff = (int64_t)nlbas << ns->lbaf.ds; npdg = ns->blkconf.discard_granularity / ns->lbasz; |