]> www.infradead.org Git - qemu-nvme.git/commit
hw/block/nvme: Add injection of Offline/Read-Only zones kb-zns
authorDmitry Fomichev <dmitry.fomichev@wdc.com>
Mon, 28 Sep 2020 02:35:26 +0000 (11:35 +0900)
committerKeith Busch <kbusch@kernel.org>
Wed, 30 Sep 2020 21:58:36 +0000 (14:58 -0700)
commitf934fcae23240b7b1829cac200d87655ae48a213
tree650ec62b875d0ec15cbed7b82feffd638084808a
parent6b7c7f286e7834d5d9a2eeb51b07e81ba0309335
hw/block/nvme: Add injection of Offline/Read-Only zones

ZNS specification defines two zone conditions for the zones that no
longer can function properly, possibly because of flash wear or other
internal fault. It is useful to be able to "inject" a small number of
such zones for testing purposes.

This commit defines two optional device properties, "offline_zones"
and "rdonly_zones". Users can assign non-zero values to these variables
to specify the number of zones to be initialized as Offline or
Read-Only. The actual number of injected zones may be smaller than the
requested amount - Read-Only and Offline counts are expected to be much
smaller than the total number of zones on a drive.

Signed-off-by: Dmitry Fomichev <dmitry.fomichev@wdc.com>
hw/block/nvme-ns.c
hw/block/nvme-ns.h
hw/block/nvme.c