[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/5] block: Remove copy-on-read from bdrv_move_f
Re: [Qemu-devel] [PATCH 1/5] block: Remove copy-on-read from bdrv_move_feature_fields()
Mon, 14 Mar 2016 09:51:02 -0600
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0
On 03/14/2016 09:44 AM, Kevin Wolf wrote:
> Ever since we first introduced bdrv_append() in commit 8802d1fd ('qapi:
> Introduce blockdev-group-snapshot-sync command'), the copy-on-read flag
> was moved to the new top layer when taking a snapshot. The only problem
> is that it doesn't make a whole lot of sense.
> The use case for manually enabled CoR is to avoid reading data twice
> from a slow remote image, so we want to save it to a local overlay, say
> an ISO image accessed via HTTP to a local qcow2 overlay. When taking a
> snapshot, we end up with a backing chain like this:
> http <- local.qcow2 <- snap_overlay.qcow2
> There is no point in doing CoR from local.qcow2 into snap_overlay.qcow2,
> we just want to keep copying data from the remote source into
> The other use case of CoR is in the context of streaming, which isn't
> very interesting for bdrv_move_feature_fields() because op blockers
> prevent this combination.
Your arguments make sense.
> This patch makes the copy-on-read flag stay on the image for which it
> was originally set and prevents it from being propagated to the new
> overlay. It is no longer intended to move CoR to the BlockBackend level.
> In order for this to make sense, we also need to keep the respective
> image read-write.
> As a side effect of these changes, creating a live snapshot image (as
> opposed to using an existing externally created one) on top of a COR
> block device works now. It used to fail because it tried to open its
> backing file both read-only and with COR.
> Signed-off-by: Kevin Wolf <address@hidden>
> block.c | 2 --
> blockdev.c | 7 +++++--
> 2 files changed, 5 insertions(+), 4 deletions(-)
Reviewed-by: Eric Blake <address@hidden>
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH 0/5] block: API changes for 2.6, Kevin Wolf, 2016/03/14
- [Qemu-devel] [PATCH 2/5] block: Remove dirty bitmaps from bdrv_move_feature_fields(), Kevin Wolf, 2016/03/14
- [Qemu-devel] [PATCH 1/5] block: Remove copy-on-read from bdrv_move_feature_fields(), Kevin Wolf, 2016/03/14
- Re: [Qemu-devel] [PATCH 1/5] block: Remove copy-on-read from bdrv_move_feature_fields(),
Eric Blake <=
- [Qemu-devel] [PATCH 4/5] block: Make backing files always writeback, Kevin Wolf, 2016/03/14
- [Qemu-devel] [PATCH 3/5] block: Remove cache.writeback from blockdev-add, Kevin Wolf, 2016/03/14
- [Qemu-devel] [PATCH 5/5] block: Reject writethrough mode except at the root, Kevin Wolf, 2016/03/14
- Re: [Qemu-devel] [PATCH 0/5] block: API changes for 2.6, Kevin Wolf, 2016/03/18