Home
last modified time | relevance | path

Searched refs:cookie (Results 1 – 25 of 62) sorted by relevance

123

/fs/fscache/
Dcookie.c24 static int fscache_acquire_non_index_cookie(struct fscache_cookie *cookie);
26 struct fscache_cookie *cookie);
27 static int fscache_attach_object(struct fscache_cookie *cookie,
35 struct fscache_cookie *cookie = _cookie; in fscache_cookie_init_once() local
37 memset(cookie, 0, sizeof(*cookie)); in fscache_cookie_init_once()
38 spin_lock_init(&cookie->lock); in fscache_cookie_init_once()
39 spin_lock_init(&cookie->stores_lock); in fscache_cookie_init_once()
40 INIT_HLIST_HEAD(&cookie->backing_objects); in fscache_cookie_init_once()
63 struct fscache_cookie *cookie; in __fscache_acquire_cookie() local
88 cookie = kmem_cache_alloc(fscache_cookie_jar, GFP_KERNEL); in __fscache_acquire_cookie()
[all …]
Dpage.c23 bool __fscache_check_page_write(struct fscache_cookie *cookie, struct page *page) in __fscache_check_page_write() argument
28 val = radix_tree_lookup(&cookie->stores, page->index); in __fscache_check_page_write()
38 void __fscache_wait_on_page_write(struct fscache_cookie *cookie, struct page *page) in __fscache_wait_on_page_write() argument
40 wait_queue_head_t *wq = bit_waitqueue(&cookie->flags, 0); in __fscache_wait_on_page_write()
42 wait_event(*wq, !__fscache_check_page_write(cookie, page)); in __fscache_wait_on_page_write()
50 bool __fscache_maybe_release_page(struct fscache_cookie *cookie, in __fscache_maybe_release_page() argument
57 _enter("%p,%p,%x", cookie, page, gfp); in __fscache_maybe_release_page()
60 val = radix_tree_lookup(&cookie->stores, page->index); in __fscache_maybe_release_page()
64 __fscache_uncache_page(cookie, page); in __fscache_maybe_release_page()
70 if (radix_tree_tag_get(&cookie->stores, page->index, in __fscache_maybe_release_page()
[all …]
Dobject.c92 struct fscache_cookie *cookie; in fscache_object_state_machine() local
146 cookie = object->cookie; in fscache_object_state_machine()
147 if (cookie) { in fscache_object_state_machine()
149 &cookie->flags)) in fscache_object_state_machine()
150 wake_up_bit(&cookie->flags, in fscache_object_state_machine()
153 &cookie->flags)) in fscache_object_state_machine()
154 wake_up_bit(&cookie->flags, in fscache_object_state_machine()
201 &object->cookie->flags)) in fscache_object_state_machine()
202 wake_up_bit(&object->cookie->flags, in fscache_object_state_machine()
364 ASSERT(object->cookie != NULL); in fscache_initialise_object()
[all …]
Dcache.c95 struct fscache_cookie *cookie) in fscache_select_cache_for_object() argument
109 spin_lock(&cookie->lock); in fscache_select_cache_for_object()
113 if (!hlist_empty(&cookie->backing_objects)) { in fscache_select_cache_for_object()
114 object = hlist_entry(cookie->backing_objects.first, in fscache_select_cache_for_object()
122 spin_unlock(&cookie->lock); in fscache_select_cache_for_object()
128 if (cookie->def->type != FSCACHE_COOKIE_TYPE_INDEX) { in fscache_select_cache_for_object()
130 spin_unlock(&cookie->lock); in fscache_select_cache_for_object()
135 spin_unlock(&cookie->lock); in fscache_select_cache_for_object()
137 if (!cookie->def->select_cache) in fscache_select_cache_for_object()
141 tag = cookie->def->select_cache(cookie->parent->netfs_data, in fscache_select_cache_for_object()
[all …]
Dobject-list.c220 FILTER(obj->cookie, in fscache_objlist_show()
255 if (obj->cookie) { in fscache_objlist_show()
257 if (obj->cookie) { in fscache_objlist_show()
258 switch (obj->cookie->def->type) { in fscache_objlist_show()
267 obj->cookie->def->type); in fscache_objlist_show()
273 obj->cookie->def->name, in fscache_objlist_show()
275 obj->cookie->flags, in fscache_objlist_show()
276 obj->cookie->netfs_data); in fscache_objlist_show()
278 if (obj->cookie->def->get_key && in fscache_objlist_show()
280 keylen = obj->cookie->def->get_key( in fscache_objlist_show()
[all …]
Dinternal.h289 static inline void fscache_cookie_put(struct fscache_cookie *cookie) in fscache_cookie_put() argument
291 BUG_ON(atomic_read(&cookie->usage) <= 0); in fscache_cookie_put()
292 if (atomic_dec_and_test(&cookie->usage)) in fscache_cookie_put()
293 __fscache_cookie_put(cookie); in fscache_cookie_put()
300 void *fscache_get_context(struct fscache_cookie *cookie, void *context) in fscache_get_context() argument
302 if (cookie->def->get_context) in fscache_get_context()
303 cookie->def->get_context(cookie->netfs_data, context); in fscache_get_context()
311 void fscache_put_context(struct fscache_cookie *cookie, void *context) in fscache_put_context() argument
313 if (cookie->def->put_context) in fscache_put_context()
314 cookie->def->put_context(cookie->netfs_data, context); in fscache_put_context()
/fs/ocfs2/dlm/
Ddlmast.c106 dlm_get_lock_cookie_node(be64_to_cpu(lock->ml.cookie)), in __dlm_queue_ast()
107 dlm_get_lock_cookie_seq(be64_to_cpu(lock->ml.cookie)), in __dlm_queue_ast()
114 dlm_get_lock_cookie_node(be64_to_cpu(lock->ml.cookie)), in __dlm_queue_ast()
115 dlm_get_lock_cookie_seq(be64_to_cpu(lock->ml.cookie))); in __dlm_queue_ast()
125 dlm_get_lock_cookie_node(be64_to_cpu(lock->ml.cookie)), in __dlm_queue_ast()
126 dlm_get_lock_cookie_seq(be64_to_cpu(lock->ml.cookie))); in __dlm_queue_ast()
172 dlm_get_lock_cookie_node(be64_to_cpu(lock->ml.cookie)), in __dlm_queue_bast()
173 dlm_get_lock_cookie_seq(be64_to_cpu(lock->ml.cookie))); in __dlm_queue_bast()
231 dlm_get_lock_cookie_node(be64_to_cpu(lock->ml.cookie)), in dlm_do_local_ast()
232 dlm_get_lock_cookie_seq(be64_to_cpu(lock->ml.cookie))); in dlm_do_local_ast()
[all …]
Ddlmlock.c64 u8 node, u64 cookie);
316 create.cookie = lock->ml.cookie; in dlm_send_remote_lock_request()
399 u8 node, u64 cookie) in dlm_init_lock() argument
415 newlock->ml.cookie = cpu_to_be64(cookie); in dlm_init_lock()
427 struct dlm_lock * dlm_new_lock(int type, u8 node, u64 cookie, in dlm_new_lock() argument
447 dlm_init_lock(lock, type, node, cookie); in dlm_new_lock()
499 be64_to_cpu(create->cookie), NULL); in dlm_create_lock_handler()
546 static inline void dlm_get_next_cookie(u8 node_num, u64 *cookie) in dlm_get_next_cookie() argument
554 *cookie = (dlm_next_cookie | tmpnode); in dlm_get_next_cookie()
Ddlmconvert.c287 dlm_get_lock_cookie_node(be64_to_cpu(lock->ml.cookie)), in dlmconvert_remote()
288 dlm_get_lock_cookie_seq(be64_to_cpu(lock->ml.cookie)), in dlmconvert_remote()
361 convert.cookie = lock->ml.cookie; in dlm_send_remote_convert_request()
476 if (lock->ml.cookie == cnv->cookie && in dlm_convert_lock_handler()
488 dlm_get_lock_cookie_node(be64_to_cpu(cnv->cookie)), in dlm_convert_lock_handler()
489 dlm_get_lock_cookie_seq(be64_to_cpu(cnv->cookie))); in dlm_convert_lock_handler()
Ddlmunlock.c249 dlm_get_lock_cookie_node(be64_to_cpu(lock->ml.cookie)), in dlmunlock_common()
250 dlm_get_lock_cookie_seq(be64_to_cpu(lock->ml.cookie)), in dlmunlock_common()
335 unlock.cookie = lock->ml.cookie; in dlm_send_remote_unlock_request()
463 if (lock->ml.cookie == unlock->cookie && in dlm_unlock_lock_handler()
509 dlm_get_lock_cookie_node(be64_to_cpu(unlock->cookie)), in dlm_unlock_lock_handler()
510 dlm_get_lock_cookie_seq(be64_to_cpu(unlock->cookie))); in dlm_unlock_lock_handler()
Ddlmcommon.h340 __be64 cookie; member
605 __be64 cookie; member
618 __be64 cookie; member
634 __be64 cookie; member
649 __be64 cookie; member
813 static inline u8 dlm_get_lock_cookie_node(u64 cookie) in dlm_get_lock_cookie_node() argument
816 cookie >>= 56; in dlm_get_lock_cookie_node()
817 ret = (u8)(cookie & 0xffULL); in dlm_get_lock_cookie_node()
821 static inline unsigned long long dlm_get_lock_cookie_seq(u64 cookie) in dlm_get_lock_cookie_seq() argument
824 ret = ((unsigned long long)cookie) & 0x00ffffffffffffffULL; in dlm_get_lock_cookie_seq()
[all …]
/fs/cachefiles/
Dinterface.c30 struct fscache_cookie *cookie) in cachefiles_alloc_object() argument
42 _enter("{%s},%p,", cache->cache.identifier, cookie); in cachefiles_alloc_object()
58 fscache_object_init(&object->fscache, cookie, &cache->cache); in cachefiles_alloc_object()
60 object->type = cookie->def->type; in cachefiles_alloc_object()
70 keylen = cookie->def->get_key(cookie->netfs_data, buffer + 2, 512); in cachefiles_alloc_object()
86 if (cookie->def->get_aux) { in cachefiles_alloc_object()
87 auxlen = cookie->def->get_aux(cookie->netfs_data, in cachefiles_alloc_object()
93 auxdata->type = cookie->def->type; in cachefiles_alloc_object()
146 object->fscache.cookie->def->type != FSCACHE_COOKIE_TYPE_INDEX) in cachefiles_lookup_object()
206 struct fscache_cookie *cookie; in cachefiles_update_object() local
[all …]
Dxattr.c38 if (!object->fscache.cookie) in cachefiles_check_object_type()
41 snprintf(type, 3, "%02x", object->fscache.cookie->def->type); in cachefiles_check_object_type()
112 ASSERT(object->fscache.cookie); in cachefiles_set_object_xattr()
118 _debug("SET %s #%u", object->fscache.cookie->def->name, auxdata->len); in cachefiles_set_object_xattr()
141 ASSERT(object->fscache.cookie); in cachefiles_update_object_xattr()
147 _debug("SET %s #%u", object->fscache.cookie->def->name, auxdata->len); in cachefiles_update_object_xattr()
210 if (object->fscache.cookie->def->check_aux) { in cachefiles_check_object_xattr()
217 object->fscache.cookie->def->name, dlen); in cachefiles_check_object_xattr()
/fs/lockd/
Dsvc4proc.c82 resp->cookie = argp->cookie; in nlm4svc_proc_test()
89 resp->status = nlmsvc_testlock(rqstp, file, host, &argp->lock, &resp->lock, &resp->cookie); in nlm4svc_proc_test()
110 resp->cookie = argp->cookie; in nlm4svc_proc_lock()
130 argp->block, &argp->cookie, in nlm4svc_proc_lock()
151 resp->cookie = argp->cookie; in nlm4svc_proc_cancel()
184 resp->cookie = argp->cookie; in nlm4svc_proc_unlock()
213 resp->cookie = argp->cookie; in nlm4svc_proc_granted()
321 resp->cookie = argp->cookie; in nlm4svc_proc_share()
354 resp->cookie = argp->cookie; in nlm4svc_proc_unshare()
438 nlmsvc_grant_reply(&argp->cookie, argp->status); in nlm4svc_proc_granted_res()
Dclnt4xdr.c157 const struct nlm_cookie *cookie) in encode_cookie() argument
159 BUG_ON(cookie->len > NLM_MAXCOOKIELEN); in encode_cookie()
160 encode_netobj(xdr, (u8 *)&cookie->data, cookie->len); in encode_cookie()
164 struct nlm_cookie *cookie) in decode_cookie() argument
181 cookie->len = length; in decode_cookie()
182 memcpy(cookie->data, p, length); in decode_cookie()
185 cookie->len = 4; in decode_cookie()
186 memset(cookie->data, 0, 4); in decode_cookie()
394 encode_cookie(xdr, &args->cookie); in nlm4_xdr_enc_testargs()
415 encode_cookie(xdr, &args->cookie); in nlm4_xdr_enc_lockargs()
[all …]
Dclntxdr.c154 const struct nlm_cookie *cookie) in encode_cookie() argument
156 BUG_ON(cookie->len > NLM_MAXCOOKIELEN); in encode_cookie()
157 encode_netobj(xdr, (u8 *)&cookie->data, cookie->len); in encode_cookie()
161 struct nlm_cookie *cookie) in decode_cookie() argument
178 cookie->len = length; in decode_cookie()
179 memcpy(cookie->data, p, length); in decode_cookie()
182 cookie->len = 4; in decode_cookie()
183 memset(cookie->data, 0, 4); in decode_cookie()
387 encode_cookie(xdr, &args->cookie); in nlm_xdr_enc_testargs()
408 encode_cookie(xdr, &args->cookie); in nlm_xdr_enc_lockargs()
[all …]
Dsvcproc.c112 resp->cookie = argp->cookie; in nlmsvc_proc_test()
119 …>status = cast_status(nlmsvc_testlock(rqstp, file, host, &argp->lock, &resp->lock, &resp->cookie)); in nlmsvc_proc_test()
141 resp->cookie = argp->cookie; in nlmsvc_proc_lock()
161 argp->block, &argp->cookie, in nlmsvc_proc_lock()
182 resp->cookie = argp->cookie; in nlmsvc_proc_cancel()
215 resp->cookie = argp->cookie; in nlmsvc_proc_unlock()
244 resp->cookie = argp->cookie; in nlmsvc_proc_granted()
362 resp->cookie = argp->cookie; in nlmsvc_proc_share()
395 resp->cookie = argp->cookie; in nlmsvc_proc_unshare()
479 nlmsvc_grant_reply(&argp->cookie, argp->status); in nlmsvc_proc_granted_res()
Dsvclock.c57 static const char *nlmdbg_cookie2a(const struct nlm_cookie *cookie) in nlmdbg_cookie2a() argument
70 for (i = 0 ; i < cookie->len ; i++) { in nlmdbg_cookie2a()
75 sprintf(p, "%02x", cookie->data[i]); in nlmdbg_cookie2a()
159 nlmdbg_cookie2a(&block->b_call->a_args.cookie)); in nlmsvc_lookup_block()
182 nlmsvc_find_block(struct nlm_cookie *cookie) in nlmsvc_find_block() argument
187 if (nlm_cookie_match(&block->b_call->a_args.cookie,cookie)) in nlmsvc_find_block()
194 dprintk("nlmsvc_find_block(%s): block=%p\n", nlmdbg_cookie2a(cookie), block); in nlmsvc_find_block()
217 struct nlm_cookie *cookie) in nlmsvc_create_block() argument
241 nlmclnt_next_cookie(&call->a_args.cookie); in nlmsvc_create_block()
404 struct nlm_cookie *cookie, int reclaim) in nlmsvc_lock() argument
[all …]
Dxdr4.c146 if (!(p = nlm4_encode_cookie(p, &resp->cookie))) in nlm4_encode_testres()
186 if (!(p = nlm4_decode_cookie(p, &argp->cookie))) in nlm4svc_decode_testargs()
211 if (!(p = nlm4_decode_cookie(p, &argp->cookie))) in nlm4svc_decode_lockargs()
231 if (!(p = nlm4_decode_cookie(p, &argp->cookie))) in nlm4svc_decode_cancargs()
245 if (!(p = nlm4_decode_cookie(p, &argp->cookie)) in nlm4svc_decode_unlockargs()
262 if (!(p = nlm4_decode_cookie(p, &argp->cookie)) in nlm4svc_decode_shareargs()
276 if (!(p = nlm4_encode_cookie(p, &resp->cookie))) in nlm4svc_encode_shareres()
286 if (!(p = nlm4_encode_cookie(p, &resp->cookie))) in nlm4svc_encode_res()
318 if (!(p = nlm4_decode_cookie(p, &resp->cookie))) in nlm4svc_decode_res()
Dxdr.c159 if (!(p = nlm_encode_cookie(p, &resp->cookie))) in nlm_encode_testres()
195 if (!(p = nlm_decode_cookie(p, &argp->cookie))) in nlmsvc_decode_testargs()
220 if (!(p = nlm_decode_cookie(p, &argp->cookie))) in nlmsvc_decode_lockargs()
240 if (!(p = nlm_decode_cookie(p, &argp->cookie))) in nlmsvc_decode_cancargs()
254 if (!(p = nlm_decode_cookie(p, &argp->cookie)) in nlmsvc_decode_unlockargs()
271 if (!(p = nlm_decode_cookie(p, &argp->cookie)) in nlmsvc_decode_shareargs()
285 if (!(p = nlm_encode_cookie(p, &resp->cookie))) in nlmsvc_encode_shareres()
295 if (!(p = nlm_encode_cookie(p, &resp->cookie))) in nlmsvc_encode_res()
327 if (!(p = nlm_decode_cookie(p, &resp->cookie))) in nlmsvc_decode_res()
/fs/afs/
Ddir.c234 void *cookie, in afs_dir_iterate_block() argument
305 ret = filldir(cookie, in afs_dir_iterate_block()
327 static int afs_dir_iterate(struct inode *dir, unsigned *fpos, void *cookie, in afs_dir_iterate() argument
368 cookie, filldir); in afs_dir_iterate()
390 static int afs_readdir(struct file *file, void *cookie, filldir_t filldir) in afs_readdir() argument
402 cookie, filldir, file->private_data); in afs_readdir()
417 struct afs_lookup_cookie *cookie = _cookie; in afs_lookup_filldir() local
420 cookie->name, cookie->nlen, name, nlen, in afs_lookup_filldir()
427 if (cookie->nlen != nlen || memcmp(cookie->name, name, nlen) != 0) { in afs_lookup_filldir()
432 cookie->fid.vnode = ino; in afs_lookup_filldir()
[all …]
/fs/notify/
Dfsnotify.c130 int data_is, u32 cookie, in send_to_group() argument
176 data_is, cookie, *event); in send_to_group()
189 cookie, GFP_KERNEL); in send_to_group()
203 const unsigned char *file_name, u32 cookie) in fsnotify() argument
262 data_is, cookie, file_name, &event); in fsnotify()
267 data_is, cookie, file_name, &event); in fsnotify()
271 mask, data, data_is, cookie, file_name, in fsnotify()
/fs/nfs/
Dfscache.c358 struct fscache_cookie *cookie = nfsi->fscache; in nfs_fscache_release_page() local
360 BUG_ON(!cookie); in nfs_fscache_release_page()
362 cookie, page, nfsi); in nfs_fscache_release_page()
364 if (!fscache_maybe_release_page(cookie, page, gfp)) in nfs_fscache_release_page()
381 struct fscache_cookie *cookie = nfsi->fscache; in __nfs_fscache_invalidate_page() local
383 BUG_ON(!cookie); in __nfs_fscache_invalidate_page()
386 cookie, page, nfsi); in __nfs_fscache_invalidate_page()
388 fscache_wait_on_page_write(cookie, page); in __nfs_fscache_invalidate_page()
391 fscache_uncache_page(cookie, page); in __nfs_fscache_invalidate_page()
/fs/cifs/
Dfscache.c229 struct fscache_cookie *cookie = cifsi->fscache; in __cifs_fscache_invalidate_page() local
231 cFYI(1, "%s: (0x%p/0x%p)", __func__, page, cookie); in __cifs_fscache_invalidate_page()
232 fscache_wait_on_page_write(cookie, page); in __cifs_fscache_invalidate_page()
233 fscache_uncache_page(cookie, page); in __cifs_fscache_invalidate_page()
/fs/
Ddcookies.c115 int get_dcookie(struct path *path, unsigned long *cookie) in get_dcookie() argument
137 *cookie = dcookie_value(dcs); in get_dcookie()
150 unsigned long cookie = (unsigned long)cookie64; in SYSCALL_DEFINE() local
170 if (!(dcs = find_dcookie(cookie))) in SYSCALL_DEFINE()

123