mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 16:53:55 -06:00
virtio-blk: Respect discard granularity
Report the configured granularity for discard operation to the guest. If this is not set use the block size. Since until now we have ignored the configured discard granularity and always reported the block size, let's add 'report-discard-granularity' property and disable it for older machine types to avoid migration issues. Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com> Reviewed-by: Stefano Garzarella <sgarzare@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Message-Id: <20210225001239.47046-1-akihiko.odaki@gmail.com>
This commit is contained in:
parent
6157b0e197
commit
fb0b154c80
3 changed files with 9 additions and 1 deletions
|
@ -41,6 +41,7 @@ struct VirtIOBlkConf
|
|||
uint16_t num_queues;
|
||||
uint16_t queue_size;
|
||||
bool seg_max_adjust;
|
||||
bool report_discard_granularity;
|
||||
uint32_t max_discard_sectors;
|
||||
uint32_t max_write_zeroes_sectors;
|
||||
bool x_enable_wce_if_config_wce;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue