From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:43068) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QWWFT-00018W-WE for qemu-devel@nongnu.org; Tue, 14 Jun 2011 12:13:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QWWFP-0004zP-Br for qemu-devel@nongnu.org; Tue, 14 Jun 2011 12:13:51 -0400 Received: from mx1.redhat.com ([209.132.183.28]:31395) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QWWFO-0004zJ-QT for qemu-devel@nongnu.org; Tue, 14 Jun 2011 12:13:47 -0400 Message-ID: <4DF788AF.3010103@redhat.com> Date: Tue, 14 Jun 2011 10:13:35 -0600 From: Eric Blake MIME-Version: 1.0 References: <4DF762A4.2040503@us.ibm.com> In-Reply-To: <4DF762A4.2040503@us.ibm.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigDDC5F8B5829EAF712A4F1704" Subject: Re: [Qemu-devel] [libvirt] [PATCH v2] Add support for fd: protocol List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Corey Bryant Cc: libvir-list@redhat.com, Anthony Liguori , qemu-devel@nongnu.org, Tyler C Hicks This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigDDC5F8B5829EAF712A4F1704 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 06/14/2011 07:31 AM, Corey Bryant wrote: > This patch contains the Qemu code to support this solution. I would > like to solicit input from the libvirt community prior to starting > the libvirt patch. >=20 > Currently, Qemu opens an image file in addition to performing the > necessary read and write operations. The proposed solution will move > the open out of Qemu and into libvirt. Once libvirt opens an image > file for the guest, it will pass the file descriptor to Qemu via a > new fd: protocol. Certainly sounds reasonable. And libvirt already has code in place to use fd: passing for migration reasons (including the use of the getfd monitor command). > There are some additional features provided by certain image types > where Qemu reopens the image file. All of these scenarios will be > unsupported for the fd: protocol, at least for this patch: >=20 > - The -snapshot command line option As it is, libvirt is not currently exposing the -snapshot option, so no loss in functionality there (although it might be nice to someday add tha= t). > - The savevm monitor command As it is, the savevm monitor command is limited - it is an all-or-nothing command that requires that all associated disk images be qcow2 format, where qemu does the snapshot. Right now, there is work under way to add new monitor commands to facilitate live snapshots, where libvirt is instead the entity doing the snapshot and where libvirt can use qemu-img for qcow2, as well as use lvm and btrfs features for instant snapshots of other file types, as well as supporting (slower) copies as snapshots. So from that aspect, libvirt will probably want to use the newer monitor commands for live snapshot purposes anyways. > - The snapshot_blkdev monitor command Libvirt isn't currently using this feature. > - Starting Qemu with a backing file What do you mean by this? Taking a guess: In the case of a qcow2 image with a backing file, does that mean that both the qcow2 image and it's backing file can both be passed to qemu via fd: notations? That is, if the -drive file=3Dfd:4,format=3Dqcow2 opt= ion is passed, and fd4 is a qcow2 image that also has a backing file, it seems like libvirt should also be able to pass that backing file via another fd, so that qemu doesn't have to open() the backing file directly. So we would need something like -drive file=3Dfd:4,format=3Dqcow2,backing=3Dfd:5 and since backing files can be nested, we'd need some way of specifying more than one level of backing file. Libvirt already knows how to walk a chain of backing images in qcow2 files (it has to, in order to set sVirt SELinux permissions on all of those files so that qemu can open() each file), so it wouldn't be much harder for libvirt to instead do the open() and pass each fd. --=20 Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org --------------enigDDC5F8B5829EAF712A4F1704 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.11 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJN94ivAAoJEKeha0olJ0NqmVIH/3b8OiDOLgKDJuD58gdKHsLz nMN2wIDXvtcjv0baR6js3udnRDLSwTULnYYmjjOAapjPngCF2dPG89edOXz+WM8H NwHOFnxkj4bZyjtuBZHszx69SBWgTR55fNgRspGYvgMLn+oXzaJEWTb6VP488yru /jRGKfCxUulKt26tOZ+u3Mfj0QHA2spfEmvT/VCtL9kBKErPwYYnev1q3ch/nrAL dfOlLm/qrP8db1YX/AaTZFdWfJhQHEoXkEGTKEV9CoAuRGHA9vdzPTNGXNS8Z9RP YK7h/9YjQUnKVTEAKNrGFw+Bo0bxgCsUGv6B24ycEI31MJoJiITj7rqEqSp/3TM= =xpaU -----END PGP SIGNATURE----- --------------enigDDC5F8B5829EAF712A4F1704--