qemu-patch-raspberry4/hw/nvme
Klaus Jensen d7d1474fd8 hw/nvme: reimplement dsm to allow cancellation
Prior to this patch, a loop was used to issue multiple "fire and forget"
aios for each range in the command. Without a reference to the aiocb
returned from the blk_aio_pdiscard calls, the aios cannot be canceled.

Fix this by processing the ranges one after another.

As a bonus, this fixes how metadata is cleared (i.e. we only zero it out
if the data was succesfully discarded).

Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
Reviewed-by: Keith Busch <kbusch@kernel.org>
2021-06-29 07:16:25 +02:00
..
ctrl.c hw/nvme: reimplement dsm to allow cancellation 2021-06-29 07:16:25 +02:00
dif.c hw/nvme: move nvme emulation out of hw/block 2021-05-17 09:19:00 +02:00
Kconfig hw/nvme: move nvme emulation out of hw/block 2021-05-17 09:19:00 +02:00
meson.build hw/nvme: move nvme emulation out of hw/block 2021-05-17 09:19:00 +02:00
ns.c hw/nvme: default for namespace EUI-64 2021-06-29 07:16:25 +02:00
nvme.h hw/nvme: reimplement flush to allow cancellation 2021-06-29 07:16:25 +02:00
subsys.c hw/nvme: move nvme emulation out of hw/block 2021-05-17 09:19:00 +02:00
trace-events hw/nvme: reimplement dsm to allow cancellation 2021-06-29 07:16:25 +02:00
trace.h hw/nvme: move nvme emulation out of hw/block 2021-05-17 09:19:00 +02:00