From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39218) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQeLP-0007z3-6P for qemu-devel@nongnu.org; Tue, 02 Feb 2016 12:02:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aQeLK-0000ME-13 for qemu-devel@nongnu.org; Tue, 02 Feb 2016 12:02:23 -0500 References: <0cd51e11c0666c04ddb7c05293fe94afeb551e89.1454376655.git.jcody@redhat.com> From: Max Reitz Message-ID: <56B0E10B.9010709@redhat.com> Date: Tue, 2 Feb 2016 18:02:03 +0100 MIME-Version: 1.0 In-Reply-To: <0cd51e11c0666c04ddb7c05293fe94afeb551e89.1454376655.git.jcody@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="PM8dxlHTGIwaqVMWkuGvxdmsFFEIx3QXg" Subject: Re: [Qemu-devel] [PATCH v2 1/2] block: set device_list.tqe_prev to NULL on BDS removal List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jeff Cody , qemu-block@nongnu.org Cc: kwolf@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com, qemu-stable@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --PM8dxlHTGIwaqVMWkuGvxdmsFFEIx3QXg Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: quoted-printable On 02.02.2016 02:33, Jeff Cody wrote: > This fixes a regression introduced with commit 3f09bfbc7. Multiple > bugs arise in conjunction with live snapshots and mirroring operations > (which include active layer commit). >=20 > After a live snapshot occurs, the active layer and the base layer both > have a non-NULL tqe_prev field in the device_list, although the base > node's tqe_prev field points to a NULL entry. This non-NULL tqe_prev > field occurs after the bdrv_append() in the external snapshot calls > change_parent_backing_link(). >=20 > In change_parent_backing_link(), when the previous active layer is > removed from device_list, the device_list.tqe_prev pointer is not > set to NULL. >=20 > The operating scheme in the block layer is to indicate that a BDS belon= gs > in the bdrv_states device_list iff the device_list.tqe_prev pointer > is non-NULL. >=20 > This patch does two things: >=20 > 1.) Introduces a new block layer helper bdrv_device_remove() to remove = a > BDS from the device_list, and > 2.) uses that new API, which also fixes the regression once used in > change_parent_backing_link(). >=20 > Signed-off-by: Jeff Cody > --- > block.c | 24 ++++++++++++++---------- > blockdev.c | 3 +-- > include/block/block.h | 1 + > 3 files changed, 16 insertions(+), 12 deletions(-) Reviewed-by: Max Reitz --PM8dxlHTGIwaqVMWkuGvxdmsFFEIx3QXg 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 iQEcBAEBCAAGBQJWsOELAAoJEDuxQgLoOKytzBsIAKTvwjeTw+hcHnWKPYsFEb7f pmKoggHhhyPvvjcOHjqMzq7kOe9lI0w0KZpwTnA1ZfpgOjAmfKg3eP5INI2kFAZi R3lhbq7jF3ExgslmRFb+G6L4gM2XWx0t65ix7rcNNew8ARXlV7LYpbj05xPyh7c7 osw9ZgRidCgylVa78fxRNvzPPa3PHSYEEHydUZQg5xaiBaFbbNi7H8mbhMJJoZxj MKuadYdnWZ6AzZy4Na27r2IF7MbnQ6uBQjcIc1c05WyZIcOnfDEQtRyiobDHkJvZ c4Lk0r1mCYNHi+AN7Z7IJpqASjOBj8JsahnwnvTBhr1U+vtF3t7h7uusYHf3pM8= =14o/ -----END PGP SIGNATURE----- --PM8dxlHTGIwaqVMWkuGvxdmsFFEIx3QXg--