From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56623) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zi4CZ-0008DF-0h for qemu-devel@nongnu.org; Fri, 02 Oct 2015 13:32:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zi4CY-0004fc-1T for qemu-devel@nongnu.org; Fri, 02 Oct 2015 13:32:58 -0400 References: <1443705214-9304-1-git-send-email-kwolf@redhat.com> <1443705214-9304-14-git-send-email-kwolf@redhat.com> From: Max Reitz Message-ID: <560EBFBF.3040604@redhat.com> Date: Fri, 2 Oct 2015 19:32:47 +0200 MIME-Version: 1.0 In-Reply-To: <1443705214-9304-14-git-send-email-kwolf@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="4i4LHaRBbPm4BLQEA8FRLgsJBVxaU4Qn8" Subject: Re: [Qemu-devel] [PATCH v2 13/16] block: Implement bdrv_append() without bdrv_swap() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf , qemu-block@nongnu.org Cc: jcody@redhat.com, berto@igalia.com, armbru@redhat.com, stefanha@redhat.com, qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --4i4LHaRBbPm4BLQEA8FRLgsJBVxaU4Qn8 Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: quoted-printable On 01.10.2015 15:13, Kevin Wolf wrote: > Remember all parent nodes and just change the pointers there instead of= > swapping the contents of the BlockDriverState. >=20 > Handling of snapshot=3Don must be moved further down in bdrv_open() > because *pbs (which is the bs pointer in the BlockBackend) must already= > be set before bdrv_append() is called. Otherwise bdrv_append() changes > the BB's pointer to the temporary snapshot, but bdrv_open() overwrites > it with the read-only original image. >=20 > We also need to be careful to update callers as the interface changes > (becomes less insane): Previously, the meaning of the two parameters wa= s > inverted when bdrv_append() returns. Now any BDS pointers keep pointing= > to the same node. >=20 > Signed-off-by: Kevin Wolf > --- > block.c | 112 +++++++++++++++++++++++++++++++++++++++++++++--------= -------- > blockdev.c | 2 +- > 2 files changed, 85 insertions(+), 29 deletions(-) Reviewed-by: Max Reitz --4i4LHaRBbPm4BLQEA8FRLgsJBVxaU4Qn8 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 iQEcBAEBCAAGBQJWDr+/AAoJEDuxQgLoOKyt3nkH/jC11rY8vEp3IVlixsXwGPCF /CIO93xQT1zrFLFq49GGtH3tFW0i+6HeETADV/QLMsuUFhBAnbMzcKs0+eapE4dv jzkz4oxOR+ye1GQtXdoIDsj1juhVurlOcS2vO5J/qiM+EWnvfi69b84baFZingWI XFsidT9q7sWV/Js8cuRHEkg2k9PuI2vyxZx+bCCvYkRl86GyLRbjURzuLx2WPur9 DaVuvMPxcsUn23GikibGHLbEJnlWEzH0zxqIBsZm4exZ/eHDw8k5rMEctujlRtzi gh2jRvEUF4KmOTd+uRylSmbWqP6jQnU8z6A6hCaxJTHGee/Gy+Pfpn0jkJYdHt4= =MkL/ -----END PGP SIGNATURE----- --4i4LHaRBbPm4BLQEA8FRLgsJBVxaU4Qn8--