[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH V1 1/2] Implement sync modes for drive-backup.
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH V1 1/2] Implement sync modes for drive-backup. |
Date: |
Mon, 15 Jul 2013 12:50:39 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130514 Thunderbird/17.0.6 |
Il 08/07/2013 11:21, Fam Zheng ha scritto:
> > Should the source be "bs" for MIRROR_SYNC_MODE_NONE? Also in this case
> > you may want to default the format to "qcow2" instead of bs's format.
>
> Maybe not. "source" only affects when sync=top below here. For reading
> the uncopied for target from source, we can't simply assign it to "bs"
> for sync=none and create the new image with with bs->filename as backing
> file, because that way we don't know how to open it with what we have
> now: the backing file is already opened RW (as "bs").
But if we do not set the source, how can you read at all from the
temporary backup destination?
If I read the code correctly, target_bs should be opened with
BDRV_O_NO_BACKING, and then you should set target_bs->backing_hd = bs.
Which in turn would only work for a format that supports backing files
(such as qcow2).
I'm not sure how the "none" mode works with these patches. It's quite
possible I'm wrong, of course, but then the explanation should be in the
code or the commit message. It should be in the code or the commit
message even if my suggestions are applied. :)
Paolo