From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36148) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X1zHz-0004Ef-9T for qemu-devel@nongnu.org; Tue, 01 Jul 2014 10:44:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X1zHs-000804-91 for qemu-devel@nongnu.org; Tue, 01 Jul 2014 10:44:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:26292) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X1zHs-0007zm-1I for qemu-devel@nongnu.org; Tue, 01 Jul 2014 10:44:00 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s61Ehwks023959 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 1 Jul 2014 10:43:59 -0400 Message-ID: <53B2C92D.9010307@redhat.com> Date: Tue, 01 Jul 2014 08:43:57 -0600 From: Eric Blake MIME-Version: 1.0 References: <1404201136-30412-1-git-send-email-stefanha@redhat.com> In-Reply-To: <1404201136-30412-1-git-send-email-stefanha@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="UQvR0XG2LT45CaEsdqVkr7P7dbTuv61t9" Subject: Re: [Qemu-devel] [PATCH v8 for 2.1 4/4] block: add QAPI command to allow live backing file change List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi , qemu-devel@nongnu.org Cc: Kevin Wolf , Jeff Cody This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --UQvR0XG2LT45CaEsdqVkr7P7dbTuv61t9 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 07/01/2014 01:52 AM, Stefan Hajnoczi wrote: > From: Jeff Cody >=20 > This allows a user to make a live change to the backing file recorded i= n > an open image. >=20 > The image file to modify can be specified 2 ways: >=20 > 1) image filename > 2) image node-name >=20 This part of the commit message is now stale, but that's okay... > Note: this does not cause the backing file itself to be reopened; it > merely changes the backing filename in the image file structure, and > in internal BDS structures. >=20 > It is the responsibility of the user to pass a filename string that > can be resolved when the image chain is reopened, and the filename > string is not validated. >=20 > A good analogy for this command is that it is a live version of > 'qemu-img rebase -u', with respect to changing the backing file string.= >=20 > [Jeff is offline so I respun this patch in his absence. Dropped image > filename since using node-name is preferred and this is a new command. > No need to introduce the limitations of finding images by filename. > --Stefan] =2E..given that you are preserving history while documenting changes. >=20 > Reviewed-by: Eric Blake > Signed-off-by: Jeff Cody > Signed-off-by: Stefan Hajnoczi This is a big enough change that I re-reviewed the patch. The reduced capability of the command is not an issue for how libvirt plans to use it (mainly as a witness that libvirt has control over backing file strings); and it is still desirable from libvirt's point of view to introduce the command. Thanks for fixing this up. > --- > blockdev.c | 79 ++++++++++++++++++++++++++++++++++++++++++++= ++++++++ > qapi/block-core.json | 26 +++++++++++++++++ > qmp-commands.hx | 39 ++++++++++++++++++++++++++ > 3 files changed, 144 insertions(+) >=20 > +SQMP > +change-backing-file > +------------------- > +Since: 2.1 > + > +Change the backing file in the image file metadata. This does not cau= se > +QEMU to reopen the image file to reparse the backing filename (it may,= > +however, perform a reopen to change permissions from r/o -> r/w -> r/o= , > +if needed). The new backing file string is written into the image file= > +metadata, and the QEMU internal strings are updated. > + > +Arguments: > + > +- "image-node-name": The name of the block driver state node of the= > + image to modify. The "device" is argument is = used to > + verify "image-node-name" is in the chain descr= ibed by > + "device". > + (json-string, optional) No longer optional. If you still have time to fix it, great; if not, it's minor enough. My R-b still stands. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --UQvR0XG2LT45CaEsdqVkr7P7dbTuv61t9 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 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJTssktAAoJEKeha0olJ0NqVN4H+gN0I5OMWqRtRjOGr7f/eNh7 ybKFHoMs0E4bC/NXhkxfp9o26qOZwEqXyRzrVbqcCBQ55ORdQfxptgq5qWTqwSCD auKahgY3W8YjAKdmETZ8Ye3vSxA2cAUhZFwJerTkxSALF2cMWVybIfascm29ugJs smDHKPX3bdcTDBQYPsWnbJgp7DOJdf0D6mgXqI6uqD7iXIV4iRNITbFAV8NYN2Ij L+IvveKJoVgoJcpMZYweI5JC5bhm0GRHJassgkYWy36nAU0MB31tR/pEaPC97hz0 C6tWGpXDPFIXE1zpSZx7biHZlTnS9vA5iSNRwNZqBnarPI/qVtrHTkzlGZ5BQn8= =0cQR -----END PGP SIGNATURE----- --UQvR0XG2LT45CaEsdqVkr7P7dbTuv61t9--