From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54494) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZsF8O-0004Vq-4O for qemu-devel@nongnu.org; Fri, 30 Oct 2015 15:14:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZsF8M-0006ED-TS for qemu-devel@nongnu.org; Fri, 30 Oct 2015 15:14:44 -0400 References: <7c4f92e0632546aa3ff29b97af11db16f753c06a.1446039123.git.berto@igalia.com> From: Max Reitz Message-ID: <5633C199.8030209@redhat.com> Date: Fri, 30 Oct 2015 20:14:33 +0100 MIME-Version: 1.0 In-Reply-To: <7c4f92e0632546aa3ff29b97af11db16f753c06a.1446039123.git.berto@igalia.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="7HIbmrBE9Xtx0i1cGiMn7nC9on70dcNUD" Subject: Re: [Qemu-devel] [PATCH 1/2] commit: reopen overlay_bs before base List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alberto Garcia , qemu-devel@nongnu.org Cc: Kevin Wolf , Stefan Hajnoczi , qemu-stable@nongnu.org, qemu-block@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --7HIbmrBE9Xtx0i1cGiMn7nC9on70dcNUD Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: quoted-printable On 28.10.2015 14:43, Alberto Garcia wrote: > 'block-commit' needs write access to two different nodes of the chain: >=20 > - 'base', because that's where the data is written to. > - the overlay of 'top', because it needs to update the backing file > string to point to 'base' after the operation. >=20 > Both images have to be opened in read-write mode, and commit_start() > takes care of reopening them if necessary. >=20 > With the current implementation, however, when overlay_bs is reopened > in read-write mode it has the side effect of making 'base' read-only > again, eventually making 'block-commit' fail. >=20 > This needs to be fixed in bdrv_reopen(), but until we get to that it > can be worked around simply by swapping the order of base and > overlay_bs in the reopen queue. >=20 > In order to reproduce this bug, overlay_bs needs to be initially in > read-only mode. That is: the 'top' parameter of 'block-commit' cannot > be the active layer nor its immediate backing chain. >=20 > Signed-off-by: Alberto Garcia > --- > block/commit.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) Reviewed-by: Max Reitz --7HIbmrBE9Xtx0i1cGiMn7nC9on70dcNUD 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 iQEcBAEBCAAGBQJWM8GZAAoJEDuxQgLoOKytyqcH/1BSShSsnWH3oDFf7pZJoJTr 0Vm9ahkQKsf7AAGoyDve5orsP6yIpZKp4esN+JbqSRnJ5uoPxBd0LS+PIb2BeZWa 3z2ZL1Gsnb1ogdkQwP26SVS2JXlUk7XvLb+qSDEN1aP0qwliITvgZsPkBOGEsucP 94FdfBD1NPKrujIVvueuOzC9TIVW54Pe3DvliSjZ5ppAkpnXOGrSUv0iwH4qCMbZ Acbyqk+Us23BwZLajl/5SLa9DRRW4Xamewe+Esx3cHEuBEmVVNbEUR/aBI54oIxe G1EnoXCquYdfEFN9fus7dBVTV+j02jYv13Hbwmehc8/aUaEFtF4/3gTscRLUB/w= =mFow -----END PGP SIGNATURE----- --7HIbmrBE9Xtx0i1cGiMn7nC9on70dcNUD--