diff options
author | Klaus Jensen | 2021-01-19 12:42:58 +0100 |
---|---|---|
committer | Klaus Jensen | 2021-02-08 21:15:54 +0100 |
commit | a679dc3efd580de67f30dcb8cb1a52a4bb559899 (patch) | |
tree | 4bbc7daca1bdd55b9bf3dba4af8d423d19d63f7d /include/block/export.h | |
parent | hw/block/nvme: fix wrong parameter name 'cross_read' (diff) | |
download | qemu-a679dc3efd580de67f30dcb8cb1a52a4bb559899.tar.gz qemu-a679dc3efd580de67f30dcb8cb1a52a4bb559899.tar.xz qemu-a679dc3efd580de67f30dcb8cb1a52a4bb559899.zip |
hw/block/nvme: fix zone boundary check for append
When a zone append is processed the controller checks that validity of
the write before assigning the LBA to the append command. This causes
the boundary check to be wrong.
Fix this by checking the write *after* assigning the LBA. Remove the
append special case from the nvme_check_zone_write and open code it in
nvme_do_write, assigning the slba when basic sanity checks have been
performed. Then check the validity of the resulting write like any other
write command.
In the process, also fix a missing endianness conversion for the zone
append ALBA.
Reported-by: Niklas Cassel <Niklas.Cassel@wdc.com>
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