[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 5/9] block: Pass unaligned discard requests t

From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v2 5/9] block: Pass unaligned discard requests to drivers
Date: Thu, 17 Nov 2016 19:13:27 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0

On 11/17/2016 05:44 PM, Max Reitz wrote:
>> Since the SCSI specification says nothing about a minimum
>> discard granularity, and only documents the preferred
>> alignment, it is best if the block layer gives the driver
>> every bit of information about discard requests, rather than
>> rounding it to alignment boundaries early.
> Is this series supposed to address this issue? Because if so, I fail to
> see where it does. If the device advertises 15 MB as the discard
> granularity, then the iscsi driver will still drop all discard requests
> that are not aligned to 15 MB boundaries, no?

I don't have access to the device in question, so I'm hoping Peter
chimes in (oops, how'd I miss him on original CC?).  Here's all the more
he said on v1:

My gut feel, however, is that the iscsi code is NOT rounding (the qcow2
code rounded, but that's different); the regression happened in 2.7
because the block layer also started rounding, and this patch gets the
block layer rounding out of the way. If nothing changed in the iscsi
code in the meantime, then the iscsi code should now (once again) be
discarding all sizes, regardless of the 15M advertisement.

Meanwhile, I _did_ test this patch with blkdebug (see 9/9), as well as
on a slightly modified NBD client that forced 15M alignments, and for
those cases, it definitely made the difference on whether all bytes were
passed (spread across several calls), vs. just the aligned bytes in the
middle of a request larger than 15M.

> The only difference is that it's now the iscsi driver that drops the
> request instead of the generic block layer.

If the iscsi driver was ever dropping it in the first place.

Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]