Lines Matching refs:cookie

26 	struct fscache_cookie *cookie = fscache_cres_cookie(cres);  in fscache_wait_for_operation()  local
30 if (!fscache_cache_is_live(cookie->volume->cache)) { in fscache_wait_for_operation()
35 state = fscache_cookie_state(cookie); in fscache_wait_for_operation()
36 _enter("c=%08x{%u},%x", cookie->debug_id, state, want_state); in fscache_wait_for_operation()
46 wait_var_event(&cookie->state, in fscache_wait_for_operation()
47 fscache_cookie_state(cookie) != state); in fscache_wait_for_operation()
61 return cookie->volume->cache->ops->begin_operation(cres, want_state); in fscache_wait_for_operation()
72 struct fscache_cookie *cookie, in fscache_begin_operation() argument
81 cres->cache_priv = cookie; in fscache_begin_operation()
83 cres->debug_id = cookie->debug_id; in fscache_begin_operation()
84 cres->inval_counter = cookie->inval_counter; in fscache_begin_operation()
86 if (!fscache_begin_cookie_access(cookie, why)) { in fscache_begin_operation()
92 spin_lock(&cookie->lock); in fscache_begin_operation()
94 state = fscache_cookie_state(cookie); in fscache_begin_operation()
95 _enter("c=%08x{%u},%x", cookie->debug_id, state, want_state); in fscache_begin_operation()
110 WARN(1, "Can't use cookie in state %u\n", cookie->state); in fscache_begin_operation()
117 spin_unlock(&cookie->lock); in fscache_begin_operation()
118 if (!cookie->volume->cache->ops->begin_operation(cres, want_state)) in fscache_begin_operation()
123 spin_unlock(&cookie->lock); in fscache_begin_operation()
124 trace_fscache_access(cookie->debug_id, refcount_read(&cookie->ref), in fscache_begin_operation()
125 atomic_read(&cookie->n_accesses), in fscache_begin_operation()
127 timeo = wait_var_event_timeout(&cookie->state, in fscache_begin_operation()
128 fscache_cookie_state(cookie) != state, 20 * HZ); in fscache_begin_operation()
131 __func__, fscache_cookie_state(cookie), state); in fscache_begin_operation()
132 fscache_print_cookie(cookie, 'O'); in fscache_begin_operation()
138 spin_unlock(&cookie->lock); in fscache_begin_operation()
142 fscache_end_cookie_access(cookie, fscache_access_io_not_live); in fscache_begin_operation()
148 struct fscache_cookie *cookie) in __fscache_begin_read_operation() argument
150 return fscache_begin_operation(cres, cookie, FSCACHE_WANT_PARAMS, in __fscache_begin_read_operation()
156 struct fscache_cookie *cookie) in __fscache_begin_write_operation() argument
158 return fscache_begin_operation(cres, cookie, FSCACHE_WANT_PARAMS, in __fscache_begin_write_operation()
212 void __fscache_write_to_cache(struct fscache_cookie *cookie, in __fscache_write_to_cache() argument
241 if (fscache_begin_operation(cres, cookie, FSCACHE_WANT_WRITE, in __fscache_write_to_cache()
273 void __fscache_resize_cookie(struct fscache_cookie *cookie, loff_t new_size) in __fscache_resize_cookie() argument
277 trace_fscache_resize(cookie, new_size); in __fscache_resize_cookie()
278 if (fscache_begin_operation(&cres, cookie, FSCACHE_WANT_WRITE, in __fscache_resize_cookie()
281 set_bit(FSCACHE_COOKIE_NEEDS_UPDATE, &cookie->flags); in __fscache_resize_cookie()
287 cookie->volume->cache->ops->resize_cookie(&cres, new_size); in __fscache_resize_cookie()