On 03/18/2014 06:24 AM, arei.gong...@huawei.com wrote: > From: ChenLiang <chenlian...@huawei.com> > > Rebuild the cache_is_cached function by cache_get_by_addr. > > Signed-off-by: ChenLiang <chenlian...@huawei.com> > Signed-off-by: Gonglei <arei.gong...@huawei.com> > --- > page_cache.c | 38 ++++++++++++++++---------------------- > 1 file changed, 16 insertions(+), 22 deletions(-) >
> int cache_insert(PageCache *cache, uint64_t addr, const uint8_t *pdata, > uint64_t current_age) > { > > - CacheItem *it = NULL; > - > - g_assert(cache); > - g_assert(cache->page_cache); > + CacheItem *it; Why are you dropping the asserts? -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature