[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 2/2] quorum: Implement bdrv_co_pwrite_zeroes()
From: |
Alberto Garcia |
Subject: |
Re: [PATCH v3 2/2] quorum: Implement bdrv_co_pwrite_zeroes() |
Date: |
Fri, 13 Nov 2020 17:07:46 +0100 |
User-agent: |
Notmuch/0.18.2 (http://notmuchmail.org) Emacs/24.4.1 (i586-pc-linux-gnu) |
On Fri 13 Nov 2020 12:49:04 PM CET, Max Reitz wrote:
> On 11.11.20 17:53, Alberto Garcia wrote:
>> This simply calls bdrv_co_pwrite_zeroes() in all children
>>
>> Signed-off-by: Alberto Garcia <berto@igalia.com>
>> ---
>> block/quorum.c | 18 ++++++++++++++++--
>> tests/qemu-iotests/312 | 7 +++++++
>> tests/qemu-iotests/312.out | 4 ++++
>> 3 files changed, 27 insertions(+), 2 deletions(-)
>
> Should we set supported_zero_flags to something? I think we can at
> least set BDRV_REQ_NO_FALLBACK. We could also try BDRV_REQ_FUA.
We could set all supported_zero_flags as long as all children support
them, right?
>> + if (acb->flags & BDRV_REQ_ZERO_WRITE) {
>> + sacb->ret = bdrv_co_pwrite_zeroes(s->children[i], acb->offset,
>> + acb->bytes, acb->flags);
>> + } else {
>> + sacb->ret = bdrv_co_pwritev(s->children[i], acb->offset, acb->bytes,
>> + acb->qiov, acb->flags);
>> + }
>
> Seems unnecessary (bdrv_co_pwritev() can handle BDRV_REQ_ZERO_WRITE),
> but perhaps it’s good to be explicit.
pwrite_zeroes() does this additionaly:
if (!(child->bs->open_flags & BDRV_O_UNMAP)) {
flags &= ~BDRV_REQ_MAY_UNMAP;
}
Berto
[PATCH v3 1/2] quorum: Implement bdrv_co_block_status(), Alberto Garcia, 2020/11/11