summary refs log tree commit diff stats
path: root/hw/remote/memory.c
diff options
context:
space:
mode:
authorKlaus Jensen <k.jensen@samsung.com>2021-01-19 14:21:50 +0100
committerKlaus Jensen <k.jensen@samsung.com>2021-02-08 21:15:54 +0100
commit3e22762edc74be3e1ecafc361351a9640d114978 (patch)
tree6adfdce8fc97e551f4e7bf5c3e1f4bbdf28e7845 /hw/remote/memory.c
parenta679dc3efd580de67f30dcb8cb1a52a4bb559899 (diff)
downloadfocaccia-qemu-3e22762edc74be3e1ecafc361351a9640d114978.tar.gz
focaccia-qemu-3e22762edc74be3e1ecafc361351a9640d114978.zip
hw/block/nvme: refactor the logic for zone write checks
Refactor the zone write check logic such that the most "meaningful"
error is returned first. That is, first, if the zone is not writable,
return an appropriate status code for that. Then, make sure we are
actually writing at the write pointer and finally check that we do not
cross the zone write boundary. This aligns with the "priority" of status
codes for zone read checks.

Also add a couple of additional descriptive trace events and remove an
always true assert.

Cc: Dmitry Fomichev <dmitry.fomichev@wdc.com>
Tested-by: Niklas Cassel <niklas.cassel@wdc.com>
Tested-by: Dmitry Fomichev <dmitry.fomichev@wdc.com>
Reviewed-by: Dmitry Fomichev <dmitry.fomichev@wdc.com>
Reviewed-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
Diffstat (limited to 'hw/remote/memory.c')
0 files changed, 0 insertions, 0 deletions