From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56272) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WxX6r-0000vL-Bs for qemu-devel@nongnu.org; Thu, 19 Jun 2014 03:50:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WxX6i-0006lo-9y for qemu-devel@nongnu.org; Thu, 19 Jun 2014 03:50:13 -0400 Received: from mail-wi0-x22d.google.com ([2a00:1450:400c:c05::22d]:46522) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WxX6i-0006kb-1q for qemu-devel@nongnu.org; Thu, 19 Jun 2014 03:50:04 -0400 Received: by mail-wi0-f173.google.com with SMTP id cc10so8858971wib.6 for ; Thu, 19 Jun 2014 00:50:03 -0700 (PDT) Date: Thu, 19 Jun 2014 15:49:54 +0800 From: Stefan Hajnoczi Message-ID: <20140619074954.GL21236@stefanha-thinkpad.redhat.com> References: <7f5ef4d91d72afda07634f3e4d3462e1213b8c65.1403041699.git.jcody@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="rVkomL2febZOZtGQ" Content-Disposition: inline In-Reply-To: <7f5ef4d91d72afda07634f3e4d3462e1213b8c65.1403041699.git.jcody@redhat.com> Subject: Re: [Qemu-devel] [PATCH v6 for 2.1 06/10] block: extend block-commit to accept a string for the backing file List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jeff Cody Cc: kwolf@redhat.com, benoit.canet@irqsave.net, pkrempa@redhat.com, famz@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com --rVkomL2febZOZtGQ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jun 17, 2014 at 05:53:54PM -0400, Jeff Cody wrote: > On some image chains, QEMU may not always be able to resolve the > filenames properly, when updating the backing file of an image > after a block commit. >=20 > For instance, certain relative pathnames may fail, or drives may > have been specified originally by file descriptor (e.g. /dev/fd/???), > or a relative protocol pathname may have been used. >=20 > In these instances, QEMU may lack the information to be able to make > the correct choice, but the user or management layer most likely does > have that knowledge. >=20 > With this extension to the block-commit api, the user is able to change > the backing file of the overlay image as part of the block-commit > operation. >=20 > This allows the change to be 'safe', in the sense that if the attempt > to write the overlay image metadata fails, then the block-commit > operation returns failure, without disrupting the guest. >=20 > If the commit top is the active layer, then specifying the backing > file string will be treated as an error (there is no overlay image > to modify in that case). >=20 > If a backing file string is not specified in the command, the backing > file string to use is determined in the same manner as it was > previously. >=20 > Reviewed-by: Eric Blake > Signed-off-by: Jeff Cody > --- > block.c | 8 ++++++-- > block/commit.c | 9 ++++++--- > blockdev.c | 8 +++++++- > include/block/block.h | 3 ++- > include/block/block_int.h | 3 ++- > qapi/block-core.json | 23 +++++++++++++++++++++-- > qmp-commands.hx | 19 ++++++++++++++++++- > 7 files changed, 62 insertions(+), 11 deletions(-) Reviewed-by: Stefan Hajnoczi --rVkomL2febZOZtGQ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJTopYiAAoJEJykq7OBq3PICaUH/1q6Tny9jaITsWoiSX7ZQAp2 D4phiWObdzLYfJofFkAc40gF61yYmdeB3YPzIuWiaSuIXno/GEA4yAv+9Y0MROqz a/Xgt8fUSWUhiPrZ3oYQh442BK2wAhzvuATvZgCWAsoBi0/6EJRf3+Tf8IeuNu+4 HqoI/m/xq4StNh8rrkaRJXjua+gxTgBtCAVhdr3t1CHhKvvYd7HClT9ljZ32rgn2 uhgqmgHLFNpIt6jJ1N6hsvnOQdfS8FWD7zrHBIMfHPX+slXPhCrPyocdoU69lT/4 sa1gTLkGY1Wxx9ekPOWwkr8lBjn5+ZfEIT5s5K2FY7shhjg/mgllojgLWJBoK7g= =tAMm -----END PGP SIGNATURE----- --rVkomL2febZOZtGQ--