From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37253) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQitF-0007ra-2v for qemu-devel@nongnu.org; Thu, 20 Mar 2014 15:44:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WQit9-0002AB-4N for qemu-devel@nongnu.org; Thu, 20 Mar 2014 15:44:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42808) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQit8-0002A5-Rf for qemu-devel@nongnu.org; Thu, 20 Mar 2014 15:44:27 -0400 Message-ID: <532B4515.5060908@redhat.com> Date: Thu, 20 Mar 2014 13:44:21 -0600 From: Eric Blake MIME-Version: 1.0 References: <1395145464-5524-1-git-send-email-arei.gonglei@huawei.com> <1395145464-5524-7-git-send-email-arei.gonglei@huawei.com> In-Reply-To: <1395145464-5524-7-git-send-email-arei.gonglei@huawei.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="4ORtx8jU9XUCrqnnkG7lxrl8undNT2Mfp" Subject: Re: [Qemu-devel] [PATCH v3 06/10] XBZRLE: rebuild the cache_is_cached function List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: arei.gonglei@huawei.com, qemu-devel@nongnu.org Cc: ChenLiang , owasserm@redhat.com, pbonzini@redhat.com, weidong.huang@huawei.com, quintela@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --4ORtx8jU9XUCrqnnkG7lxrl8undNT2Mfp Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 03/18/2014 06:24 AM, arei.gonglei@huawei.com wrote: > From: ChenLiang >=20 > Rebuild the cache_is_cached function by cache_get_by_addr. >=20 > Signed-off-by: ChenLiang > Signed-off-by: Gonglei > --- > page_cache.c | 38 ++++++++++++++++---------------------- > 1 file changed, 16 insertions(+), 22 deletions(-) >=20 > int cache_insert(PageCache *cache, uint64_t addr, const uint8_t *pdata= , > uint64_t current_age) > { > =20 > - CacheItem *it =3D NULL; > - > - g_assert(cache); > - g_assert(cache->page_cache); > + CacheItem *it; Why are you dropping the asserts? --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --4ORtx8jU9XUCrqnnkG7lxrl8undNT2Mfp 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/ iQEcBAEBCAAGBQJTK0UVAAoJEKeha0olJ0Nq7Q8H/0um8EuTx71+SBwguHwleBuh UaEvwQve0eOpiKPjfKYOkeIVrikgMJwAZuhKhxs/woJQFh7TRrBY+EzkYGkmbO7e vlVtkd78khGR9EHLVQZrdsCYofIPZJPD0uqjJQQR9KmmPtnrD3vxS3jgNawfpdCm IxZCmuLuZ/27BSJX7h5U+6V0UGf3SGKwJ/1J/VcQ5r8q8lmjO6G2ploI6itttA5/ hGgUThf1r9VTstcuB8FK08yT7L+BMWvK241arlyzaF2mSH1CaK+JosAuby21K4c9 qrmH61TEX5p78V31/pUyfutDyoRwnYLTr3HIBCebQtDY/h5Y5vAHK1Z+X8bjWT8= =Tcaw -----END PGP SIGNATURE----- --4ORtx8jU9XUCrqnnkG7lxrl8undNT2Mfp--