Received: from eggs.gnu.org ([2001:4830:134:3::10]:59909) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WgnTI-0001Fi-Oo for qemu-devel@nongnu.org; Sat, 03 May 2014 23:52:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WgnTE-0003sp-Ah for qemu-devel@nongnu.org; Sat, 03 May 2014 23:52:12 -0400 Received: from soto.provo.novell.com ([137.65.250.214]:43870) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WgnTE-0003sY-1t for qemu-devel@nongnu.org; Sat, 03 May 2014 23:52:08 -0400 Message-Id: <536629DF02000066000248A6@soto.provo.novell.com> Date: Sat, 03 May 2014 21:51:59 -0600 From: "Chun Yan Liu" References: <1398762656-26079-1-git-send-email-cyliu@suse.com> <1398762656-26079-13-git-send-email-cyliu@suse.com> <5360587E.5050409@redhat.com> In-Reply-To: <5360587E.5050409@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Subject: Re: [Qemu-devel] [PATCH V26 12/32] change block layer to support both QemuOpts and QEMUOptionParamter List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, Eric Blake Cc: stefanha@redhat.com >>> On 4/30/2014 at 09:57 AM, in message <5360587E.5050409@redhat.com>, = Eric Blake wrote:=20 > On 04/29/2014 03:10 AM, Chunyan Liu wrote:=20 > > Change block layer to support both QemuOpts and QEMUOptionParameter.=20= > > After this patch, it will change backend drivers one by one. At the = end,=20 > > QEMUOptionParameter will be removed and only QemuOpts is kept.=20 > > =20 > > Signed-off-by: Dong Xu Wang =20 > > Signed-off-by: Chunyan Liu =20 > > ---=20 > > Changes to V25:=20 > > * fix Eric's comments:=20 > > * update bdrv_create_co_entry and bdrv_amend_options code, to let = it=20 > > more readable.=20 > > * add assertion in bdrv_register.=20 > > * improve comments to create_opts in header file.=20 > > =20 > > block.c | 158 =20 > ++++++++++++++++++++++++++++++++--------------=20 > > block/cow.c | 2 +-=20 > > block/qcow.c | 2 +-=20 > > block/qcow2.c | 2 +-=20 > > block/qed.c | 2 +-=20 > > block/raw_bsd.c | 2 +-=20 > > block/vhdx.c | 2 +-=20 > > block/vmdk.c | 4 +-=20 > > block/vvfat.c | 2 +-=20 > > include/block/block.h | 7 +-=20 > > include/block/block_int.h | 13 +++-=20 > > qemu-img.c | 94 +++++++++++++--------------=20 > > 12 files changed, 180 insertions(+), 110 deletions(-)=20 > > =20 > =20 > > =20 > > - if (options) {=20 > > - param =3D parse_option_parameters(options, create_options, = param);=20 > > - if (param =3D=3D NULL) {=20 > > - error_report("Invalid options for file format '%s'.", =20 > out_fmt);=20 > > - ret =3D -1;=20 > > - goto out;=20 > > - }=20 > > - } else {=20 > > - param =3D parse_option_parameters("", create_options, = param);=20 > > + opts =3D qemu_opts_create(create_opts, NULL, 0, &error_abort);=20 > > + if (options && qemu_opts_do_parse(opts, options, NULL)) {=20 > > + error_report("Invalid options for file format '%s'.", = out_fmt);=20 > =20 > Pre-existing, but error messages shouldn't end in '.' Trivial enough = to=20 > not stop the review.=20 Didn't modify it since to avoid print info change, let qemu-iotests PASS. With a simple grep, there are many places in current code where error messages are ended in '.', could change all in a time maybe. > =20 > Yay! I like it! It's looking a lot better with all the fixes you've=20 > folded in.=20 > =20 > Reviewed-by: Eric Blake =20 > =20 > -- =20 > Eric Blake eblake redhat com +1-919-301-3266=20 > Libvirt virtualization library http://libvirt.org=20 > =20 > =20