[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 3/7] qcow2: Make perform_cow() call do_perform_c
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-devel] [PATCH 3/7] qcow2: Make perform_cow() call do_perform_cow() twice |
Date: |
Fri, 26 May 2017 12:08:34 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Am 26.05.2017 um 11:10 hat Alberto Garcia geschrieben:
> 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).
Wait... How did you manage to hack my email account and insert this
retroactively? :-)
Sorry for the noise then, I must have been looking at the source code of
the wrong commit.
Kevin
Re: [Qemu-devel] [PATCH 7/7] qcow2: Merge the writing of the COW regions with the guest data, Alberto Garcia, 2017/05/26
[Qemu-devel] [PATCH 2/7] qcow2: Use unsigned int for both members of Qcow2COWRegion, Alberto Garcia, 2017/05/23
[Qemu-devel] [PATCH 1/7] qcow2: Remove unused Error in do_perform_cow(), Alberto Garcia, 2017/05/23