diff options
author | Klaus Jensen | 2021-01-19 14:21:50 +0100 |
---|---|---|
committer | Klaus Jensen | 2021-02-08 21:15:54 +0100 |
commit | 3e22762edc74be3e1ecafc361351a9640d114978 (patch) | |
tree | 6adfdce8fc97e551f4e7bf5c3e1f4bbdf28e7845 /include/block/export.h | |
parent | hw/block/nvme: fix zone boundary check for append (diff) | |
download | qemu-3e22762edc74be3e1ecafc361351a9640d114978.tar.gz qemu-3e22762edc74be3e1ecafc361351a9640d114978.tar.xz 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 'include/block/export.h')
0 files changed, 0 insertions, 0 deletions