From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50158) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGpbj-00068J-LJ for qemu-devel@nongnu.org; Sat, 25 Jun 2016 11:34:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bGpbh-0002Ea-Ok for qemu-devel@nongnu.org; Sat, 25 Jun 2016 11:34:54 -0400 References: <1466500894-9710-1-git-send-email-kwolf@redhat.com> <1466500894-9710-11-git-send-email-kwolf@redhat.com> From: Max Reitz Message-ID: Date: Sat, 25 Jun 2016 17:34:44 +0200 MIME-Version: 1.0 In-Reply-To: <1466500894-9710-11-git-send-email-kwolf@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="tghN8VTOp0nalPmQLvEKDXSdnetwFjfMP" Subject: Re: [Qemu-devel] [PATCH 10/17] block: Use BlockBackend for I/O in bdrv_commit() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf , qemu-block@nongnu.org Cc: stefanha@redhat.com, famz@redhat.com, jcody@redhat.com, qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --tghN8VTOp0nalPmQLvEKDXSdnetwFjfMP From: Max Reitz To: Kevin Wolf , qemu-block@nongnu.org Cc: stefanha@redhat.com, famz@redhat.com, jcody@redhat.com, qemu-devel@nongnu.org Message-ID: Subject: Re: [PATCH 10/17] block: Use BlockBackend for I/O in bdrv_commit() References: <1466500894-9710-1-git-send-email-kwolf@redhat.com> <1466500894-9710-11-git-send-email-kwolf@redhat.com> In-Reply-To: <1466500894-9710-11-git-send-email-kwolf@redhat.com> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: quoted-printable On 21.06.2016 11:21, Kevin Wolf wrote: > Just like block jobs, the HMP commit command should use its own > BlockBackend for doing I/O on BlockDriverStates. >=20 > Signed-off-by: Kevin Wolf > --- > block/commit.c | 30 ++++++++++++++++++++---------- > 1 file changed, 20 insertions(+), 10 deletions(-) >=20 > diff --git a/block/commit.c b/block/commit.c > index 4ac3df3..17f365f 100644 > --- a/block/commit.c > +++ b/block/commit.c [...] > @@ -342,7 +349,7 @@ int bdrv_commit(BlockDriverState *bs) > =20 > /* qemu_try_blockalign() for bs will choose an alignment that work= s for > * bs->backing->bs as well, so no need to compare the alignment ma= nually. */ This comment will need a little change, too. With that done: Reviewed-by: Max Reitz > - buf =3D qemu_try_blockalign(bs, COMMIT_BUF_SECTORS * BDRV_SECTOR_S= IZE); > + buf =3D blk_try_blockalign(src, COMMIT_BUF_SECTORS * BDRV_SECTOR_S= IZE); > if (buf =3D=3D NULL) { > ret =3D -ENOMEM; > goto ro_cleanup; --tghN8VTOp0nalPmQLvEKDXSdnetwFjfMP Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJXbqSUAAoJEDuxQgLoOKytz6kH/j/dw5gbJpA9Txjopif77+2I tzb1NHgvhhhT2lrpmF4lVGAM8mgDCf5lzqWlI+DRBJHltj4pX0+zhBkQ9VwoPuuJ t8L6Bk9T0i/HS4pL899mh7iqMzn/7SbfbHAACTRCFJtbeHV4ro6gTH5e6xcuDUyi oxEWav4V0znv68ManGacOFbKBew8rzdA8q1TdSuGgHRhw1oKPuSGDKHl1NkMu/cz OZOVfbZ8XwQX4VxYfNJGbiNxqWN+PKyVK6510Y4yQyrvjwSmMV5nDR9w5RRK6Uss 6SjovNU096HP7bl2hJtcJCwzwtdFQs3HMJ6rEyEGJeGicE5tSK55Av5AcmDRias= =du2W -----END PGP SIGNATURE----- --tghN8VTOp0nalPmQLvEKDXSdnetwFjfMP--