]> git.proxmox.com Git - mirror_qemu.git/commit
hw/block/nvme: cache lba and ms sizes
authorKlaus Jensen <k.jensen@samsung.com>
Wed, 14 Apr 2021 19:34:44 +0000 (21:34 +0200)
committerKlaus Jensen <k.jensen@samsung.com>
Mon, 17 May 2021 07:18:59 +0000 (09:18 +0200)
commit6146f3dd35cd71b4ac594b2e4a86c4bb3af52b09
treefdd23c3808b8955e71db54c6d66b7f6446ec548e
parent0c76fee2f8e3332b8d7db89da13e4edfdcc5a4f0
hw/block/nvme: cache lba and ms sizes

There is no need to look up the lba size and metadata size in the LBA
Format structure everytime we want to use it. And we use it a lot.

Cache the values in the NvmeNamespace and update them if the namespace
is formatted.

Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
Reviewed-by: Keith Busch <kbusch@kernel.org>
hw/block/nvme-dif.c
hw/block/nvme-ns.c
hw/block/nvme.c
hw/block/nvme.h