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()
90 spin_lock(&cookie->lock); in fscache_begin_operation()
92 state = fscache_cookie_state(cookie); in fscache_begin_operation()
93 _enter("c=%08x{%u},%x", cookie->debug_id, state, want_state); in fscache_begin_operation()
108 WARN(1, "Can't use cookie in state %u\n", cookie->state); in fscache_begin_operation()
115 spin_unlock(&cookie->lock); in fscache_begin_operation()
116 if (!cookie->volume->cache->ops->begin_operation(cres, want_state)) in fscache_begin_operation()
121 spin_unlock(&cookie->lock); in fscache_begin_operation()
122 trace_fscache_access(cookie->debug_id, refcount_read(&cookie->ref), in fscache_begin_operation()
123 atomic_read(&cookie->n_accesses), in fscache_begin_operation()
125 timeo = wait_var_event_timeout(&cookie->state, in fscache_begin_operation()
126 fscache_cookie_state(cookie) != state, 20 * HZ); in fscache_begin_operation()
129 __func__, fscache_cookie_state(cookie), state); in fscache_begin_operation()
130 fscache_print_cookie(cookie, 'O'); in fscache_begin_operation()
136 spin_unlock(&cookie->lock); in fscache_begin_operation()
140 fscache_end_cookie_access(cookie, fscache_access_io_not_live); in fscache_begin_operation()
146 struct fscache_cookie *cookie) in __fscache_begin_read_operation() argument
148 return fscache_begin_operation(cres, cookie, FSCACHE_WANT_PARAMS, in __fscache_begin_read_operation()
154 struct fscache_cookie *cookie) in __fscache_begin_write_operation() argument
156 return fscache_begin_operation(cres, cookie, FSCACHE_WANT_PARAMS, in __fscache_begin_write_operation()
174 struct fscache_cookie *cookie) in fscache_dirty_folio() argument
183 if (!fscache_cookie_valid(cookie)) in fscache_dirty_folio()
195 fscache_use_cookie(cookie, true); in fscache_dirty_folio()
248 void __fscache_write_to_cache(struct fscache_cookie *cookie, in __fscache_write_to_cache() argument
276 if (fscache_begin_operation(cres, cookie, FSCACHE_WANT_WRITE, in __fscache_write_to_cache()
307 void __fscache_resize_cookie(struct fscache_cookie *cookie, loff_t new_size) in __fscache_resize_cookie() argument
311 trace_fscache_resize(cookie, new_size); in __fscache_resize_cookie()
312 if (fscache_begin_operation(&cres, cookie, FSCACHE_WANT_WRITE, in __fscache_resize_cookie()
315 set_bit(FSCACHE_COOKIE_NEEDS_UPDATE, &cookie->flags); in __fscache_resize_cookie()
321 cookie->volume->cache->ops->resize_cookie(&cres, new_size); in __fscache_resize_cookie()