From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48951) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afUm2-000156-KI for qemu-devel@nongnu.org; Mon, 14 Mar 2016 11:51:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1afUm1-00041H-JJ for qemu-devel@nongnu.org; Mon, 14 Mar 2016 11:51:14 -0400 References: <1457970292-12291-1-git-send-email-kwolf@redhat.com> <1457970292-12291-2-git-send-email-kwolf@redhat.com> From: Eric Blake Message-ID: <56E6DDE6.7040402@redhat.com> Date: Mon, 14 Mar 2016 09:51:02 -0600 MIME-Version: 1.0 In-Reply-To: <1457970292-12291-2-git-send-email-kwolf@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="gaK3ejUJfugDj0Qq9rbo4U2Tx1v28n4Co" Subject: Re: [Qemu-devel] [PATCH 1/5] block: Remove copy-on-read from bdrv_move_feature_fields() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf , qemu-block@nongnu.org Cc: qemu-devel@nongnu.org, jsnow@redhat.com, armbru@redhat.com, mreitz@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --gaK3ejUJfugDj0Qq9rbo4U2Tx1v28n4Co Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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. >=20 > 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: >=20 > http <- local.qcow2 <- snap_overlay.qcow2 >=20 > 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 > local.qcow2. >=20 > 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. >=20 > 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= =2E > In order for this to make sense, we also need to keep the respective > image read-write. >=20 > 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. >=20 > Signed-off-by: Kevin Wolf > --- > block.c | 2 -- > blockdev.c | 7 +++++-- > 2 files changed, 5 insertions(+), 4 deletions(-) Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --gaK3ejUJfugDj0Qq9rbo4U2Tx1v28n4Co Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJW5t3mAAoJEKeha0olJ0NqI+cH/iDC1H21bbdK39Z/UdoHEwJg FimqfOylAzzvAV70ZDMcO+chbHliXhgfSVVEyLX9aEv32jaSB4KLobof9HO6ptTr TP1HMSP895xRuFMS+psfSrcm7d3sX28+07vUAC+nWyyKBl82N1+LfxC3FFwspznm yUKM7teGRjGWgPXkY9OTHPicIJOiIf14lk+idv1K7BlRh51gT8N1CXzIfiukN0/M +TOSi1qFtG4RlfiaggO8ELnAvJQOFylL7xCB/M4IR6xC5fvcuvj6sF+WAj50vDdQ 7TpQb2tKC4l64tCR0ub+o0OGzhfl8F8ohpjX/eZ1/PhRRS/bFO8EwJfhXrP07GA= =VGYm -----END PGP SIGNATURE----- --gaK3ejUJfugDj0Qq9rbo4U2Tx1v28n4Co--