[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] qcow2: Support BDRV_REQ_MAY_UNMAP
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH] qcow2: Support BDRV_REQ_MAY_UNMAP |
Date: |
Thu, 29 Sep 2016 09:58:56 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 |
On 29/09/2016 04:21, Fam Zheng wrote:
> On Wed, 09/28 18:11, Max Reitz wrote:
>> Note that BDRV_REQ_MAY_UNMAP does not mean "Yes, please discard" but
>> just "You may discard if it's easier for you". But it's actually not
>> easier for us, so I don't see why we're doing it.
>>
>> As far as I can guess you actually want some way to tell a block driver
>> to actually make an effort to discard clusters as long they then read
>> back as zero (which is why you cannot simply use bdrv_pdiscard()).
>> However, I think this would require a new flag called
>> BDRV_REQ_SHOULD_UNMAP (which should imply BDRV_REQ_MAY_UNMAP).
>
> This flag doesn't make sense to me, if the protocol doesn't know how to unmap,
> it can ignore BDRV_REQ_MAY_UNMAP, but not BDRV_REQ_SHOULD_UNMAP. It just
> complicates things a little.
I don't think we actually have a use for a "MAY" unmap flag. Either we
keep the not-so-perfect name or we replace MAY_UNMAP with "should" or
"want" or "would_like" unmap... But Fam's patch does do what was
intended for the flag (which is the equivalent of the UNMAP bit in the
SCSI WRITE SAME command).
Paolo
- [Qemu-devel] [PATCH] qcow2: Support BDRV_REQ_MAY_UNMAP, Fam Zheng, 2016/09/28
- Re: [Qemu-devel] [PATCH] qcow2: Support BDRV_REQ_MAY_UNMAP, Kevin Wolf, 2016/09/29
- Re: [Qemu-devel] [PATCH] qcow2: Support BDRV_REQ_MAY_UNMAP, Fam Zheng, 2016/09/29
- Re: [Qemu-devel] [PATCH] qcow2: Support BDRV_REQ_MAY_UNMAP, Kevin Wolf, 2016/09/29
- Re: [Qemu-devel] [PATCH] qcow2: Support BDRV_REQ_MAY_UNMAP, Paolo Bonzini, 2016/09/29
- Re: [Qemu-devel] [PATCH] qcow2: Support BDRV_REQ_MAY_UNMAP, Kevin Wolf, 2016/09/29
- Re: [Qemu-devel] [PATCH] qcow2: Support BDRV_REQ_MAY_UNMAP, Paolo Bonzini, 2016/09/29
- Re: [Qemu-devel] [PATCH] qcow2: Support BDRV_REQ_MAY_UNMAP, Paolo Bonzini, 2016/09/29
- Re: [Qemu-devel] [PATCH] qcow2: Support BDRV_REQ_MAY_UNMAP, Fam Zheng, 2016/09/29
- Re: [Qemu-devel] [PATCH] qcow2: Support BDRV_REQ_MAY_UNMAP, Kevin Wolf, 2016/09/30