From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41339) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aGrKL-0001OL-Pj for qemu-devel@nongnu.org; Wed, 06 Jan 2016 11:52:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aGrKK-00006u-R5 for qemu-devel@nongnu.org; Wed, 06 Jan 2016 11:52:49 -0500 References: <1451981476-29390-1-git-send-email-famz@redhat.com> <1451981476-29390-13-git-send-email-famz@redhat.com> From: Max Reitz Message-ID: <568D4658.5070605@redhat.com> Date: Wed, 6 Jan 2016 17:52:40 +0100 MIME-Version: 1.0 In-Reply-To: <1451981476-29390-13-git-send-email-famz@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="SKFbgckLsRGVgFrGwOB8OmSN6IS7ES92l" Subject: Re: [Qemu-devel] [PATCH v5 12/15] block: Remove the "bs->file" test in bdrv_co_get_block_status List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng , qemu-devel@nongnu.org Cc: Kevin Wolf , pbonzini@redhat.com, Stefan Hajnoczi , qemu-block@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --SKFbgckLsRGVgFrGwOB8OmSN6IS7ES92l Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: quoted-printable On 05.01.2016 09:11, Fam Zheng wrote: > Now that all drivers return the right "file" pointer, we can remove thi= s > check. >=20 > Signed-off-by: Fam Zheng > --- > block/io.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/block/io.c b/block/io.c > index 492c291..1ca4e61 100644 > --- a/block/io.c > +++ b/block/io.c > @@ -1550,7 +1550,7 @@ static int64_t coroutine_fn bdrv_co_get_block_sta= tus(BlockDriverState *bs, > } > } > =20 > - if (bs->file && *file && *file !=3D bs && > + if (*file && *file !=3D bs && > (ret & BDRV_BLOCK_DATA) && !(ret & BDRV_BLOCK_ZERO) && > (ret & BDRV_BLOCK_OFFSET_VALID)) { > BlockDriverState *file2; Fine by itself, but I think patch 1 needs a change, so this should be - if (bs->file && + if (*file && *file !=3D bs && instead; and the first parameter of the subsequent bdrv_co_get_block_status() call then needs to be changed to *file here (instead of in patch 1). Max --SKFbgckLsRGVgFrGwOB8OmSN6IS7ES92l 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 iQEcBAEBCAAGBQJWjUZYAAoJEDuxQgLoOKytEj0H/3BMi329/05y8CkSF9l6Cqcq uTT3vylAtcikpf5H7smcbQosNQF2bJdAqj/Dsg9Vo+Z4qb3ixxt4zJCnLRTYUl3T ylvZyJ4dQT7l957afEKPkrptlADUpl1oY8DUrOE4Ywj2UfkaBW68Y9o9oA4WmmMr G976J3mYa9Cl9aqYO5DHw0rxXBWksGHd3e81zvvXJijBsA2w3+Tg3Jfii+vsNF9m Nx2KNmhiAe8GyHglaPoo0nzy2EWTUGi3L32rTRzxu5FfjxzLANNYkf2L2ImUnWIr 8ZjbEJ5JUH5YTvtFUZCIBJn1HvoOizPsg20CwFZIbdFNpqsY8T/UGuQODXC62dY= =Uj20 -----END PGP SIGNATURE----- --SKFbgckLsRGVgFrGwOB8OmSN6IS7ES92l--