OpenCloudOS-Kernel/drivers/vdpa/vdpa_sim
Stefano Garzarella 4a44a5eda2 vdpa_sim_blk: add support for discard and write-zeroes
Expose VIRTIO_BLK_F_DISCARD and VIRTIO_BLK_F_WRITE_ZEROES features
to the drivers and handle VIRTIO_BLK_T_DISCARD and
VIRTIO_BLK_T_WRITE_ZEROES requests checking ranges and flags.

The simulator behaves like a ramdisk, so for VIRTIO_BLK_F_DISCARD
does nothing, while for VIRTIO_BLK_T_WRITE_ZEROES sets to 0 the
specified region.

Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Message-Id: <20220811083632.77525-5-sgarzare@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2022-08-11 04:44:58 -04:00
..
Makefile vdpa: add vdpa simulator for block device 2021-05-03 04:55:53 -04:00
vdpa_sim.c vdpa_sim: Implement suspend vdpa op 2022-08-11 04:31:15 -04:00
vdpa_sim.h vdpa_sim: Implement suspend vdpa op 2022-08-11 04:31:15 -04:00
vdpa_sim_blk.c vdpa_sim_blk: add support for discard and write-zeroes 2022-08-11 04:44:58 -04:00
vdpa_sim_net.c vdpa_sim: Implement suspend vdpa op 2022-08-11 04:31:15 -04:00