From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36394) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UwydQ-0007fx-Pq for qemu-devel@nongnu.org; Wed, 10 Jul 2013 13:57:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UwydM-0006G0-Ow for qemu-devel@nongnu.org; Wed, 10 Jul 2013 13:57:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:2609) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UwydM-0006Ew-Ho for qemu-devel@nongnu.org; Wed, 10 Jul 2013 13:56:56 -0400 Message-ID: <51DDA061.2000108@redhat.com> Date: Wed, 10 Jul 2013 11:56:49 -0600 From: Eric Blake MIME-Version: 1.0 References: <1371547919-15654-1-git-send-email-wdongxu@linux.vnet.ibm.com> <1371547919-15654-6-git-send-email-wdongxu@linux.vnet.ibm.com> In-Reply-To: <1371547919-15654-6-git-send-email-wdongxu@linux.vnet.ibm.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="----enig2ISICQNWKDVAQXGDKNING" Subject: Re: [Qemu-devel] [PATCH V16 5/7] Use QemuOpts support in block layer List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Dong Xu Wang Cc: kwolf@redhat.com, wdongxu@cn.ibm.com, qemu-devel@nongnu.org, stefanha@redhat.com, armbru@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2ISICQNWKDVAQXGDKNING Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 06/18/2013 03:31 AM, Dong Xu Wang wrote: > This patch uses QemuOpts related functions in block layer, add > a member bdrv_create_opts to BlockDriver struct, it returns > a QemuOptsList pointer, which includes the image format's create > options. >=20 > And create options's primary consumer is block creating related s/options's/options'/ > functions, so modify them together. >=20 > Signed-off-by: Dong Xu Wang > --- >=20 > block.c | 100 +++++++++++------------ > block/cow.c | 52 ++++++------ > block/gluster.c | 37 +++++---- > block/iscsi.c | 31 ++++---- > block/qcow.c | 67 ++++++++-------- > block/qcow2.c | 199 +++++++++++++++++++++++++-------------= -------- > block/qed.c | 108 +++++++++++++------------ > block/qed.h | 2 +- > block/raw-posix.c | 59 ++++++-------- > block/raw-win32.c | 31 ++++---- > block/raw.c | 30 ++++--- > block/rbd.c | 62 +++++++-------- > block/sheepdog.c | 81 +++++++++---------- > block/ssh.c | 29 ++++--- > block/vdi.c | 70 ++++++++-------- > block/vmdk.c | 129 ++++++++++++++++-------------- > block/vpc.c | 65 ++++++++------- > block/vvfat.c | 11 +-- > include/block/block.h | 5 +- > include/block/block_int.h | 6 +- > qemu-img.c | 65 ++++++++------- > 21 files changed, 629 insertions(+), 610 deletions(-) Looks rather daunting. If I had reviewed this earlier in the series, I might have asked if it was worth splitting into one patch per block backend (if incremental conversion works), rather than all backends in one go. But now that we are already at v16, I'm not so sure. So I'll go ahead and review under the assumption that a single patch is okay. > +++ b/block.c > @@ -385,7 +384,7 @@ int bdrv_create(BlockDriver *drv, const char* filen= ame, > CreateCo cco =3D { > .drv =3D drv, > .filename =3D g_strdup(filename), > - .options =3D options, > + .opts =3D opts ?: qemu_opts_create_nofail(drv->bdrv_create_opt= s), I guess I can't complain about this gcc extension, since you aren't the first. The rest of this file looks okay. > +++ b/block/cow.c =2E..and here, I ran out of review time at the moment, so I'm splitting the review across multiple emails when I get more time. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org ------enig2ISICQNWKDVAQXGDKNING 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.13 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJR3aBhAAoJEKeha0olJ0Nq1BoIAK4PX3SC5cPo02ox37utxPUG EmiDQNhHAPVyKvab1f3KZmN/8midHAy/jUoNQwvZ037oMxzRYonq7/eg4T0Jxpe7 8h4hgNWj5PBWhoAOb6CU7JbETN0/+ix6ehlMEXBffcqUQ5ddt9rryXrvLo4uqOQY 6nYOQzHggvNWjcQSy6J+5G5ZYlI1lQwNNlzuLU0tVvYbPjQk+Tx4q7URfZMGio6i kEAEP1MKZOwnspxwkYnsB9pVfkCcDo9wc7UmRbcGk/lIVJGUZkH9TgjjBvpfMSF5 x0GW/eeCESooqv3hLlcAX8g4BRLy2Z05ykGN9VX4qYtorwzysVbLQaIQ+XHwieo= =HfdG -----END PGP SIGNATURE----- ------enig2ISICQNWKDVAQXGDKNING--