From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47578) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ykv84-0000OR-EG for qemu-devel@nongnu.org; Wed, 22 Apr 2015 09:55:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ykv7z-0007qq-A5 for qemu-devel@nongnu.org; Wed, 22 Apr 2015 09:55:52 -0400 Received: from mail-wg0-x234.google.com ([2a00:1450:400c:c00::234]:34622) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ykv7z-0007qL-2d for qemu-devel@nongnu.org; Wed, 22 Apr 2015 09:55:47 -0400 Received: by wgso17 with SMTP id o17so247982269wgs.1 for ; Wed, 22 Apr 2015 06:55:46 -0700 (PDT) Date: Wed, 22 Apr 2015 14:55:43 +0100 From: Stefan Hajnoczi Message-ID: <20150422135543.GU27617@stefanha-thinkpad.redhat.com> References: <1426069701-1405-1-git-send-email-den@openvz.org> <1426069701-1405-20-git-send-email-den@openvz.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="1YSLKY9nNiKnepPi" Content-Disposition: inline In-Reply-To: <1426069701-1405-20-git-send-email-den@openvz.org> Subject: Re: [Qemu-devel] [PATCH 19/27] block/parallels: implement incorrect close detection List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Denis V. Lunev" Cc: Kevin Wolf , qemu-devel@nongnu.org, Stefan Hajnoczi --1YSLKY9nNiKnepPi Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Mar 11, 2015 at 01:28:13PM +0300, Denis V. Lunev wrote: > The software driver must set inuse field in Parallels header to > 0x746F6E59 when the image is opened in read-write mode. The presence of > this magic in the header on open forces image consistency check. >=20 > There is an unfortunate trick here. We can not check for inuse in > parallels_check as this will happen too late. It is possible to do > that for simple check, but during the fix this would always report > an error as the image was opened in BDRV_O_RDWR mode. Thus we save > the flag in BDRVParallelsState for this. >=20 > On the other hand, nothing should be done to clear inuse in > parallels_check. Generic close will do the job right. >=20 > Signed-off-by: Denis V. Lunev > Reviewed-by: Roman Kagan > CC: Kevin Wolf > CC: Stefan Hajnoczi > --- > block/parallels.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 50 insertions(+) Reviewed-by: Stefan Hajnoczi --1YSLKY9nNiKnepPi Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJVN6hfAAoJEJykq7OBq3PIQmkH/AucliG2OuxwrdD+yvDPnjZm /FqOaUWprfp+AFUmVNmeQrLoKBYTDDalnkQU24Pjdmp8LRvKv2QJwNmDWRVe0z1p nID29+qhD7vqdSfMsw7MBW5mKe4coKt7Whs9LR/HVJPprnrnr4f4NpUlbravqw6l ZdhcP2PTQHXXSJgud9X75sOVGwrc4MOuKoX09Mrar88QeCfSQiR+cuAt22XEPo/5 RBO22QpqzwiMIBJ1voJokZcRnGoEtH+Fd2rhJrqWpvniFWrLlxZHuYSTjAlNvUER Mfg42puYWfiIzdBbFmMUS3QKnMj1mFLVefGZ/HLqL5mCRHX5fiuz6ygeG0lyZ5M= =F1GJ -----END PGP SIGNATURE----- --1YSLKY9nNiKnepPi--