From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51635) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJTa1-0007qx-QO for qemu-devel@nongnu.org; Thu, 05 Feb 2015 16:03:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YJTZx-0001AH-Bk for qemu-devel@nongnu.org; Thu, 05 Feb 2015 16:03:17 -0500 Received: from mx1.redhat.com ([209.132.183.28]:36993) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJTZx-0001A9-35 for qemu-devel@nongnu.org; Thu, 05 Feb 2015 16:03:13 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t15L3B2d029255 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 5 Feb 2015 16:03:12 -0500 Message-ID: <54D3DA8E.2080300@redhat.com> Date: Thu, 05 Feb 2015 14:03:10 -0700 From: Eric Blake MIME-Version: 1.0 References: <1423162705-32065-1-git-send-email-mreitz@redhat.com> <1423162705-32065-10-git-send-email-mreitz@redhat.com> In-Reply-To: <1423162705-32065-10-git-send-email-mreitz@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="c9aBiuwdVMLNwXT6aF8eu3LP222uc5UwO" Subject: Re: [Qemu-devel] [PATCH v4 09/16] qemu-img: Use BlockBackend as far as possible List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz , qemu-devel@nongnu.org Cc: Kevin Wolf , Stefan Hajnoczi This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --c9aBiuwdVMLNwXT6aF8eu3LP222uc5UwO Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 02/05/2015 11:58 AM, Max Reitz wrote: > Although qemu-img already creates BlockBackends, it does not do accesse= s > to the images through them. This patch converts all of the bdrv_* calls= > for which this is currently possible to blk_* calls. Most of the > remaining calls will probably stay bdrv_* calls because they really do > operate on the BDS level instead of the BB level. >=20 > Signed-off-by: Max Reitz > --- > qemu-img.c | 82 ++++++++++++++++++++++++++++++------------------------= -------- > 1 file changed, 39 insertions(+), 43 deletions(-) >=20 > diff --git a/qemu-img.c b/qemu-img.c > index 26fb3a1..77fd4e4 100644 > --- a/qemu-img.c > +++ b/qemu-img.c > @@ -1010,19 +1010,19 @@ static int64_t sectors_to_process(int64_t total= , int64_t from) > * Returns 0 in case sectors are filled with 0, 1 if sectors contain n= on-zero > * data and negative value on error. > * > - * @param bs: Driver used for accessing file > + * @param blk: BlockBackend for the image > * @param sect_num: Number of first sector to check > * @param sect_count: Number of sectors to check As long as you are touching this, is it worth compressing the double space into one for consistency with the other lines? That's minor, and it DOES look a lot nicer without the conversions from bytes to sectors. Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --c9aBiuwdVMLNwXT6aF8eu3LP222uc5UwO 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/ iQEcBAEBCAAGBQJU09qOAAoJEKeha0olJ0Nq8y4H/2wFcSjLw9Po4O/vmwn2mK+P /t2Il0TbbpqpUhOunV0SbAKikPEKad2mnBL9+zpJAvv5qpjiKBaWaLoTmxrGfvTI mrPefKqZGI2JVeWeNsZSPpnNZUIu+Cfye/jaJ3S8ArDZ6uORauhDjJyT5+/ZBWmf X53NGUlZO6w9ZLyLPQrFFhDNGAQ6dZ8NzEMN5Ik1nWGvoxGfrETz97cbZ+Ekvnm5 dOYLeVWcqFc6KxuRviEJslWdEJNjvSHsmb5gIgrv83FpTVTJVl6ONlnlnNRrFHpn z+6iIuuhLvGygFaYgd38FaGKOnjwP37AuHYNGORCmJcjxO6ZlD2d00gqNYO/lKU= =tCDG -----END PGP SIGNATURE----- --c9aBiuwdVMLNwXT6aF8eu3LP222uc5UwO--