[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH 3/7] qcow2: Make perform_cow() call do_perform_c
From: |
Alberto Garcia |
Subject: |
Re: [Qemu-block] [PATCH 3/7] qcow2: Make perform_cow() call do_perform_cow() twice |
Date: |
Fri, 26 May 2017 11:10:25 +0200 |
User-agent: |
Notmuch/0.18.2 (http://notmuchmail.org) Emacs/24.4.1 (i586-pc-linux-gnu) |
On Fri 26 May 2017 10:11:29 AM CEST, Kevin Wolf <address@hidden> wrote:
>> --- a/block/qcow2-cluster.c
>> +++ b/block/qcow2-cluster.c
>> @@ -414,6 +414,10 @@ static int coroutine_fn do_perform_cow(BlockDriverState
>> *bs,
>> struct iovec iov;
>> int ret;
>>
>> + if (bytes == 0) {
>> + return 0;
>> + }
>> +
[...]
>> +static int perform_cow(BlockDriverState *bs, QCowL2Meta *m)
>> {
>> BDRVQcow2State *s = bs->opaque;
>> + Qcow2COWRegion *start = &m->cow_start;
>> + Qcow2COWRegion *end = &m->cow_end;
>> int ret;
>>
>> - if (r->nb_bytes == 0) {
>> + if (start->nb_bytes == 0 && end->nb_bytes == 0) {
>> return 0;
>> }
>
> With this change, it can now happen that we call do_perform_cow() with
> bytes == 0.
Yes, but see the change I made to do_perform_cow() in the same patch
(quoted above).
Berto
- Re: [Qemu-block] [PATCH 1/7] qcow2: Remove unused Error in do_perform_cow(), (continued)
[Qemu-block] [PATCH 3/7] qcow2: Make perform_cow() call do_perform_cow() twice, Alberto Garcia, 2017/05/23
[Qemu-block] [PATCH 4/7] qcow2: Split do_perform_cow() into _read(), _encrypt() and _write(), Alberto Garcia, 2017/05/23
Re: [Qemu-block] [PATCH 0/7] qcow2: Reduce the number of I/O ops when doing COW, Eric Blake, 2017/05/23
- Re: [Qemu-block] [PATCH 0/7] qcow2: Reduce the number of I/O ops when doing COW, Alberto Garcia, 2017/05/24
- Re: [Qemu-block] [PATCH 0/7] qcow2: Reduce the number of I/O ops when doing COW, Anton Nefedov, 2017/05/24
- Re: [Qemu-block] [PATCH 0/7] qcow2: Reduce the number of I/O ops when doing COW, Alberto Garcia, 2017/05/24
- Re: [Qemu-block] [PATCH 0/7] qcow2: Reduce the number of I/O ops when doing COW, Anton Nefedov, 2017/05/24
- Re: [Qemu-block] [PATCH 0/7] qcow2: Reduce the number of I/O ops when doing COW, Alberto Garcia, 2017/05/25
- Re: [Qemu-block] [PATCH 0/7] qcow2: Reduce the number of I/O ops when doing COW, Alberto Garcia, 2017/05/25
Re: [Qemu-block] [PATCH 0/7] qcow2: Reduce the number of I/O ops when doing COW, Kevin Wolf, 2017/05/26