On 02/27/2014 09:10 PM, Gonglei (Arei) wrote: > Rebuild the cache_is_cached function. > > Signed-off-by: ChenLiang <chenlian...@huawei.com> > Signed-off-by: Gonglei <arei.gong...@huawei.com> > --- > page_cache.c | 33 +++++++++++++++------------------ > 1 file changed, 15 insertions(+), 18 deletions(-) > > diff --git a/page_cache.c b/page_cache.c > index fa58ab2..34ec933 100644 > --- a/page_cache.c > +++ b/page_cache.c > @@ -121,24 +121,6 @@ static size_t cache_get_cache_pos(const PageCache *cache, > return pos; > } > > -bool cache_is_cached(const PageCache *cache, uint64_t addr, > - uint64_t current_age)
Indentation was off pre-patch... > > +bool cache_is_cached(const PageCache *cache, uint64_t addr, > + uint64_t current_age) ...but you should take the opportunity to fix it here. bool cache_is_cached(const PageCache *cache, uint64_t addr, uint64_t current_age) > + if (it->it_addr == addr) { > + /* updata the it_age when the cache hit */ s/updata/update/ -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature