• Home
  • Raw
  • Download

Lines Matching refs:h

43 static void cache_init(struct cache_head *h, struct cache_detail *detail)  in cache_init()  argument
46 INIT_HLIST_NODE(&h->cache_list); in cache_init()
47 h->flags = 0; in cache_init()
48 kref_init(&h->ref); in cache_init()
49 h->expiry_time = now + CACHE_NEW_EXPIRY; in cache_init()
53 h->last_refresh = now; in cache_init()
182 struct cache_head *h) in cache_make_negative() argument
184 set_bit(CACHE_NEGATIVE, &h->flags); in cache_make_negative()
185 trace_cache_entry_make_negative(detail, h); in cache_make_negative()
189 struct cache_head *h, in cache_entry_update() argument
193 detail->update(h, new); in cache_entry_update()
194 trace_cache_entry_update(detail, h); in cache_entry_update()
196 cache_make_negative(detail, h); in cache_entry_update()
244 static inline int cache_is_valid(struct cache_head *h) in cache_is_valid() argument
246 if (!test_bit(CACHE_VALID, &h->flags)) in cache_is_valid()
250 if (test_bit(CACHE_NEGATIVE, &h->flags)) in cache_is_valid()
265 static int try_to_negate_entry(struct cache_detail *detail, struct cache_head *h) in try_to_negate_entry() argument
270 rv = cache_is_valid(h); in try_to_negate_entry()
272 cache_make_negative(detail, h); in try_to_negate_entry()
273 cache_fresh_locked(h, seconds_since_boot()+CACHE_NEW_EXPIRY, in try_to_negate_entry()
278 cache_fresh_unlocked(h, detail); in try_to_negate_entry()
297 struct cache_head *h, struct cache_req *rqstp) in cache_check() argument
303 rv = cache_is_valid(h); in cache_check()
306 refresh_age = (h->expiry_time - h->last_refresh); in cache_check()
307 age = seconds_since_boot() - h->last_refresh; in cache_check()
313 (h->expiry_time != 0 && age > refresh_age/2)) { in cache_check()
316 switch (detail->cache_upcall(detail, h)) { in cache_check()
318 rv = try_to_negate_entry(detail, h); in cache_check()
321 cache_fresh_unlocked(h, detail); in cache_check()
327 if (!cache_defer_req(rqstp, h)) { in cache_check()
332 rv = cache_is_valid(h); in cache_check()
338 cache_put(h, detail); in cache_check()
1189 static int cache_pipe_upcall(struct cache_detail *detail, struct cache_head *h) in cache_pipe_upcall() argument
1195 if (test_bit(CACHE_CLEANED, &h->flags)) in cache_pipe_upcall()
1214 if (test_bit(CACHE_PENDING, &h->flags)) { in cache_pipe_upcall()
1215 crq->item = cache_get(h); in cache_pipe_upcall()
1217 trace_cache_entry_upcall(detail, h); in cache_pipe_upcall()
1230 int sunrpc_cache_pipe_upcall(struct cache_detail *detail, struct cache_head *h) in sunrpc_cache_pipe_upcall() argument
1232 if (test_and_set_bit(CACHE_PENDING, &h->flags)) in sunrpc_cache_pipe_upcall()
1234 return cache_pipe_upcall(detail, h); in sunrpc_cache_pipe_upcall()
1239 struct cache_head *h) in sunrpc_cache_pipe_upcall_timeout() argument
1243 trace_cache_entry_no_listener(detail, h); in sunrpc_cache_pipe_upcall_timeout()
1246 return sunrpc_cache_pipe_upcall(detail, h); in sunrpc_cache_pipe_upcall_timeout()
1274 int h, l; in qword_get() local
1276 h = hex_to_bin(bp[0]); in qword_get()
1277 if (h < 0) in qword_get()
1284 *dest++ = (h << 4) | l; in qword_get()
1892 void sunrpc_cache_unhash(struct cache_detail *cd, struct cache_head *h) in sunrpc_cache_unhash() argument
1895 if (!hlist_unhashed(&h->cache_list)){ in sunrpc_cache_unhash()
1896 sunrpc_begin_cache_remove_entry(h, cd); in sunrpc_cache_unhash()
1898 sunrpc_end_cache_remove_entry(h, cd); in sunrpc_cache_unhash()