From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:51060) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1zcU-0003KS-CG for qemu-devel@nongnu.org; Thu, 16 Aug 2012 08:56:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T1zcT-0004XI-1q for qemu-devel@nongnu.org; Thu, 16 Aug 2012 08:56:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:8726) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1zcS-0004XA-Pm for qemu-devel@nongnu.org; Thu, 16 Aug 2012 08:56:12 -0400 Message-ID: <502CEDE9.9010504@redhat.com> Date: Thu, 16 Aug 2012 06:56:09 -0600 From: Eric Blake MIME-Version: 1.0 References: <1345107632-10460-1-git-send-email-kwolf@redhat.com> In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig3AE2D815699D757EFD592DAB" Subject: Re: [Qemu-devel] [PATCH] Documentation: Warn against qemu-img on active image List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Kevin Wolf , qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig3AE2D815699D757EFD592DAB Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 08/16/2012 04:00 AM, Peter Maydell wrote: > On 16 August 2012 10:00, Kevin Wolf wrote: >> People have repeatedly expected that you can do things like snapshotti= ng >> an image with qemu-img while a qemu instance is running. Maybe we need= >> to consider locking the files while they are in use, Sounds like a nice feature bit to add to qcow2v3, where both qemu-img and qemu check if the locking feature is enabled for an image, as well as maintain a header bit that is set when the image is open read-write and refuse to use the image if the lock bit is set. > but having a >> warning in the qemu-img manpage is doable for 1.2 and can't hurt anywa= y. >> >> Signed-off-by: Kevin Wolf >=20 >> + >> +@b{Warning:} Never use qemu-img to modify images in use by a running = virtual >> +machine or any other process, this may destroy the image. >=20 > ";" or ", because". Is this strong enough? Remember, with qcow2v3 and qed, the mere act of opening an image will perform refcount checks that modify the image, unless you explicitly request otherwise, which means even a query of the file metadata may result in modifying the image as part of the default open. Maybe incorporate some ideas from this attempt: Never use qemu-img to modify files in use by a running virtual machine or any other process; this may destroy the image. Be aware that some image formats perform modifications even on query operations. Also, be aware that querying an image that is being modified by another process may encounter inconsistent state. --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enig3AE2D815699D757EFD592DAB Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJQLO3pAAoJEKeha0olJ0NqE00H/1IlXJE/cD64gJESJgtmk7ZM uQh+qfaycjhQlH7n39sWomsFT9sgJTIO0Xi+IxcoVWZcxhIKEHqtZYI4pAENfphY x0buG0qV1ZDM4hng4YoSHfJ+zzXZhsSeMu18iiOhisZKrEmU3sVUZnVquXu7QlMp Y9udHkD8q+96FejWFrlTQOQlemON6L2B4t0+m9z6lykmtid2+CoSv3BQi+w+1qBW 3jln24cQq7ohN6RJKpPlsE7acHDGZuguba71J+TCWAcCasQi8uwoghtqGPOvOzlj vOttiRF333u35JllTlTzsI/sWAguN1JP0ah44IFGfTeFmzafrWEaV7G6/yNdn0o= =rtEn -----END PGP SIGNATURE----- --------------enig3AE2D815699D757EFD592DAB--