mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
virtio-blk: add DISCARD and WRITE_ZEROES features
This patch adds the support of DISCARD and WRITE_ZEROES commands, that have been introduced in the virtio-blk protocol to have better performance when using SSD backend. We support only one segment per request since multiple segments are not widely used and there are no userspace APIs that allow applications to submit multiple segments in a single call. Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Stefano Garzarella <sgarzare@redhat.com> Message-id: 20190221103314.58500-7-sgarzare@redhat.com Message-Id: <20190221103314.58500-7-sgarzare@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
parent
20764be042
commit
37b06f8d46
2 changed files with 186 additions and 0 deletions
|
@ -38,6 +38,8 @@ struct VirtIOBlkConf
|
|||
uint32_t request_merging;
|
||||
uint16_t num_queues;
|
||||
uint16_t queue_size;
|
||||
uint32_t max_discard_sectors;
|
||||
uint32_t max_write_zeroes_sectors;
|
||||
};
|
||||
|
||||
struct VirtIOBlockDataPlane;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue