[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH v6 11/42] block: Add bdrv_supports_compressed_wr
From: |
Max Reitz |
Subject: |
Re: [Qemu-block] [PATCH v6 11/42] block: Add bdrv_supports_compressed_writes() |
Date: |
Mon, 9 Sep 2019 10:09:53 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 |
On 05.09.19 15:11, Kevin Wolf wrote:
> Am 09.08.2019 um 18:13 hat Max Reitz geschrieben:
>> Filters cannot compress data themselves but they have to implement
>> .bdrv_co_pwritev_compressed() still (or they cannot forward compressed
>> writes). Therefore, checking whether
>> bs->drv->bdrv_co_pwritev_compressed is non-NULL is not sufficient to
>> know whether the node can actually handle compressed writes. This
>> function looks down the filter chain to see whether there is a
>> non-filter that can actually convert the compressed writes into
>> compressed data (and thus normal writes).
>>
>> Signed-off-by: Max Reitz <address@hidden>
>> Reviewed-by: Vladimir Sementsov-Ogievskiy <address@hidden>
>
> Should patches 2 and 3 that add the .bdrv_co_pwritev_compressed()
> callback to filter drivers come only after this one?
Why not.
> And should we also
> support it in the mirror filter?
Hm. AFAIU, compressed writes have very limited use. You can basically
only use them when writing to a new image (where you’d never write
anywhere you’ve already written something to), i.e. for qemu-img convert
or the backup target. It makes sense to blockdev-backup to throttle, so
that’s why it should be implemented there. I don’t really see how it
would make sense for mirror.
OTOH, it doesn’t make sense for COR either. And it isn’t that hard.
Now I don’t have a strong preference for either dropping the COR patch
or adding it to mirror as well...
Max
signature.asc
Description: OpenPGP digital signature