Lines Matching full:ci

113 	struct ceph_inode_info* ci = cookie_netfs_data;  in ceph_fscache_inode_check_aux()  local
114 struct inode* inode = &ci->vfs_inode; in ceph_fscache_inode_check_aux()
121 aux.version = ci->i_version; in ceph_fscache_inode_check_aux()
128 dout("ceph inode 0x%p cached okay\n", ci); in ceph_fscache_inode_check_aux()
140 struct ceph_inode_info *ci = ceph_inode(inode); in ceph_fscache_register_inode_cookie() local
153 if (!ci->fscache) { in ceph_fscache_register_inode_cookie()
155 aux.version = ci->i_version; in ceph_fscache_register_inode_cookie()
158 ci->fscache = fscache_acquire_cookie(fsc->fscache, in ceph_fscache_register_inode_cookie()
160 &ci->i_vino, sizeof(ci->i_vino), in ceph_fscache_register_inode_cookie()
162 ci, i_size_read(inode), false); in ceph_fscache_register_inode_cookie()
167 void ceph_fscache_unregister_inode_cookie(struct ceph_inode_info* ci) in ceph_fscache_unregister_inode_cookie() argument
171 if ((cookie = ci->fscache) == NULL) in ceph_fscache_unregister_inode_cookie()
174 ci->fscache = NULL; in ceph_fscache_unregister_inode_cookie()
176 fscache_uncache_all_inode_pages(cookie, &ci->vfs_inode); in ceph_fscache_unregister_inode_cookie()
177 fscache_relinquish_cookie(cookie, &ci->i_vino, false); in ceph_fscache_unregister_inode_cookie()
188 struct ceph_inode_info *ci = ceph_inode(inode); in ceph_fscache_file_set_cookie() local
190 if (!fscache_cookie_valid(ci->fscache)) in ceph_fscache_file_set_cookie()
196 fscache_disable_cookie(ci->fscache, &ci->i_vino, false); in ceph_fscache_file_set_cookie()
197 fscache_uncache_all_inode_pages(ci->fscache, inode); in ceph_fscache_file_set_cookie()
199 fscache_enable_cookie(ci->fscache, &ci->i_vino, i_size_read(inode), in ceph_fscache_file_set_cookie()
201 if (fscache_cookie_enabled(ci->fscache)) { in ceph_fscache_file_set_cookie()
216 static inline bool cache_valid(struct ceph_inode_info *ci) in cache_valid() argument
218 return ci->i_fscache_gen == ci->i_rdcache_gen; in cache_valid()
229 struct ceph_inode_info *ci = ceph_inode(inode); in ceph_readpage_from_fscache() local
232 if (!cache_valid(ci)) in ceph_readpage_from_fscache()
235 ret = fscache_read_or_alloc_page(ci->fscache, page, in ceph_readpage_from_fscache()
258 struct ceph_inode_info *ci = ceph_inode(inode); in ceph_readpages_from_fscache() local
261 if (!cache_valid(ci)) in ceph_readpages_from_fscache()
264 ret = fscache_read_or_alloc_pages(ci->fscache, mapping, pages, nr_pages, in ceph_readpages_from_fscache()
284 struct ceph_inode_info *ci = ceph_inode(inode); in ceph_readpage_to_fscache() local
290 if (!cache_valid(ci)) in ceph_readpage_to_fscache()
293 ret = fscache_write_page(ci->fscache, page, i_size_read(inode), in ceph_readpage_to_fscache()
296 fscache_uncache_page(ci->fscache, page); in ceph_readpage_to_fscache()
301 struct ceph_inode_info *ci = ceph_inode(inode); in ceph_invalidate_fscache_page() local
306 fscache_wait_on_page_write(ci->fscache, page); in ceph_invalidate_fscache_page()
307 fscache_uncache_page(ci->fscache, page); in ceph_invalidate_fscache_page()
336 void ceph_fscache_revalidate_cookie(struct ceph_inode_info *ci) in ceph_fscache_revalidate_cookie() argument
338 if (cache_valid(ci)) in ceph_fscache_revalidate_cookie()
343 mutex_lock(&ci->i_truncate_mutex); in ceph_fscache_revalidate_cookie()
344 if (!cache_valid(ci)) { in ceph_fscache_revalidate_cookie()
345 if (fscache_check_consistency(ci->fscache, &ci->i_vino)) in ceph_fscache_revalidate_cookie()
346 fscache_invalidate(ci->fscache); in ceph_fscache_revalidate_cookie()
347 spin_lock(&ci->i_ceph_lock); in ceph_fscache_revalidate_cookie()
348 ci->i_fscache_gen = ci->i_rdcache_gen; in ceph_fscache_revalidate_cookie()
349 spin_unlock(&ci->i_ceph_lock); in ceph_fscache_revalidate_cookie()
351 mutex_unlock(&ci->i_truncate_mutex); in ceph_fscache_revalidate_cookie()