qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 7/7] qcow2: Merge the writing of the COW regions


From: Alberto Garcia
Subject: Re: [Qemu-devel] [PATCH 7/7] qcow2: Merge the writing of the COW regions with the guest data
Date: Wed, 24 May 2017 21:05:08 +0200
User-agent: Notmuch/0.18.2 (http://notmuchmail.org) Emacs/24.4.1 (i586-pc-linux-gnu)

On Wed 24 May 2017 06:43:31 PM CEST, Anton Nefedov wrote:
>> +    if (m->data_qiov) {
>> +        qemu_iovec_reset(&qiov);
>> +        qemu_iovec_add(&qiov, start_buffer, start->nb_bytes);
>> +        qemu_iovec_concat(&qiov, m->data_qiov, 0, data_bytes);
>> +        qemu_iovec_add(&qiov, end_buffer, end->nb_bytes);
>
> Can it be a problem if (m->data_qiov->niov == IOV_MAX)?
> We had to add merge-iovecs code for the case (maybe there's better
> solution?)

You're right, good catch! I'll add a check for that. To be honest I
don't think that's likely to happen in practice, so if it does we can
simply fall back to the old behavior (separate writes).

> Also, will this work if allocation is split into several l2metas?
> e.g. one has cow_start.nb_bytes and another has cow_end.nb_bytes

The guest request will be merged with the first l2meta that has to copy
at least one of the two regions. It doesn't matter if the other one has
nb_bytes == 0.

Berto



reply via email to

[Prev in Thread] Current Thread [Next in Thread]