Hi Paolo!
On 2/22/19 10:21 AM, Paolo Bonzini wrote:
> On 21/02/19 17:38, Jakub Jermar wrote:
>>
>> my device enforces the discard_sector_alignment on the request (both
>> sector and num_sectors), but for some reason the blkdiscard command and
>> Linux driver issue requests that do not honor this alignment.
>>
>> Does discard_sector_alignment represent a strict requirement that must
>> be always honored or is it rather a hint to the driver?
>
> It's a hint that misaligned requests might not result in any discard
> happening at all.
In that case, would the failure to discard anything be silent? In other
words, would the request complete with VIRTIO_BLK_S_OK or rather any of
VIRTIO_BLK_S_IOERR or VIRTIO_BLK_S_UNSUPP?
Thanks,
Jakub