From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57007) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zuj4i-00085h-He for qemu-devel@nongnu.org; Fri, 06 Nov 2015 10:37:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zuj4c-0002sn-Tk for qemu-devel@nongnu.org; Fri, 06 Nov 2015 10:37:12 -0500 Received: from mail-wm0-x232.google.com ([2a00:1450:400c:c09::232]:38863) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zuj4c-0002se-NT for qemu-devel@nongnu.org; Fri, 06 Nov 2015 10:37:06 -0500 Received: by wmec201 with SMTP id c201so20780579wme.1 for ; Fri, 06 Nov 2015 07:37:06 -0800 (PST) Date: Fri, 6 Nov 2015 15:37:04 +0000 From: Stefan Hajnoczi Message-ID: <20151106153704.GP12285@stefanha-x1.localdomain> References: <1446657582-21619-1-git-send-email-den@openvz.org> <1446657582-21619-10-git-send-email-den@openvz.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="5/6IVfYouxg+lu1D" Content-Disposition: inline In-Reply-To: <1446657582-21619-10-git-send-email-den@openvz.org> Subject: Re: [Qemu-devel] [PATCH 09/11] migration: add missed aio_context_acquire for state writing/reading 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 --5/6IVfYouxg+lu1D Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Nov 04, 2015 at 08:19:40PM +0300, Denis V. Lunev wrote: > aio_context should be locked in the similar way as was done in QMP > snapshot creation in the other case there are a lot of possible > troubles if native AIO mode is enabled for disk. >=20 > qemu_fopen_bdrv and bdrv_fclose are used in real snapshot operations only > along with block drivers. This change should influence only HMP snapshot > operations. >=20 > AioContext lock is reqursive. Thus nested locking should not be a problem. hmp_savevm() and load_vmstate() look up the BlockDriverState and perform other operations on it. So the natural place to call acquire/release is in hmp_savevm() and load_vmstate(). They need that anyway since they also perform other operations. qemu_fopen_bdrv() and bdrv_fclose() don't need to worry about AioContext. --5/6IVfYouxg+lu1D Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJWPMkgAAoJEJykq7OBq3PI7hEIAJRzvN+YSSyiXFD5oavuk2wc zoLYfWJ+6k7mdL5+x7L75iHkkt+TKjKaEpb9V7cEyC89PT3Our3qJ+SfYnbmYEQz M6uw36FOsj7RhTRJDqBNx7vidqSFe/KtyZFlaWPFo0VDmjFQpY6L9yANbMx03yo4 n0DU+g+Xmsan7wRw6IIfPuk8tt7x9qSbIjgymDjNEfkOr0fYyFeRgLi4vOx4Rq6a E1TkzGbxWBQTe3ey1A7oeE5umPsENEbTkhQ/E0w0mYudqVWx2lRud/N9AnMthFri gLn7l7jtL/8s9cO8Xo26IP8Z4ZpEWD8RE78ne2lfLEY1II/LTqc+4pbizFYogXk= =d/gT -----END PGP SIGNATURE----- --5/6IVfYouxg+lu1D--