Lines Matching refs:ci

125 	struct ceph_inode_info* ci = cookie_netfs_data;  in ceph_fscache_inode_check_aux()  local
126 struct inode* inode = &ci->vfs_inode; in ceph_fscache_inode_check_aux()
133 aux.version = ci->i_version; in ceph_fscache_inode_check_aux()
140 dout("ceph inode 0x%p cached okay\n", ci); in ceph_fscache_inode_check_aux()
152 struct ceph_inode_info *ci = ceph_inode(inode); in ceph_fscache_register_inode_cookie() local
165 if (!ci->fscache) { in ceph_fscache_register_inode_cookie()
167 aux.version = ci->i_version; in ceph_fscache_register_inode_cookie()
170 ci->fscache = fscache_acquire_cookie(fsc->fscache, in ceph_fscache_register_inode_cookie()
172 &ci->i_vino, sizeof(ci->i_vino), in ceph_fscache_register_inode_cookie()
174 ci, i_size_read(inode), false); in ceph_fscache_register_inode_cookie()
179 void ceph_fscache_unregister_inode_cookie(struct ceph_inode_info* ci) in ceph_fscache_unregister_inode_cookie() argument
183 if ((cookie = ci->fscache) == NULL) in ceph_fscache_unregister_inode_cookie()
186 ci->fscache = NULL; in ceph_fscache_unregister_inode_cookie()
188 fscache_uncache_all_inode_pages(cookie, &ci->vfs_inode); in ceph_fscache_unregister_inode_cookie()
189 fscache_relinquish_cookie(cookie, &ci->i_vino, false); in ceph_fscache_unregister_inode_cookie()
200 struct ceph_inode_info *ci = ceph_inode(inode); in ceph_fscache_file_set_cookie() local
202 if (!fscache_cookie_valid(ci->fscache)) in ceph_fscache_file_set_cookie()
208 fscache_disable_cookie(ci->fscache, &ci->i_vino, false); in ceph_fscache_file_set_cookie()
209 fscache_uncache_all_inode_pages(ci->fscache, inode); in ceph_fscache_file_set_cookie()
211 fscache_enable_cookie(ci->fscache, &ci->i_vino, i_size_read(inode), in ceph_fscache_file_set_cookie()
213 if (fscache_cookie_enabled(ci->fscache)) { in ceph_fscache_file_set_cookie()
228 static inline bool cache_valid(struct ceph_inode_info *ci) in cache_valid() argument
230 return ci->i_fscache_gen == ci->i_rdcache_gen; in cache_valid()
241 struct ceph_inode_info *ci = ceph_inode(inode); in ceph_readpage_from_fscache() local
244 if (!cache_valid(ci)) in ceph_readpage_from_fscache()
247 ret = fscache_read_or_alloc_page(ci->fscache, page, in ceph_readpage_from_fscache()
270 struct ceph_inode_info *ci = ceph_inode(inode); in ceph_readpages_from_fscache() local
273 if (!cache_valid(ci)) in ceph_readpages_from_fscache()
276 ret = fscache_read_or_alloc_pages(ci->fscache, mapping, pages, nr_pages, in ceph_readpages_from_fscache()
296 struct ceph_inode_info *ci = ceph_inode(inode); in ceph_readpage_to_fscache() local
302 if (!cache_valid(ci)) in ceph_readpage_to_fscache()
305 ret = fscache_write_page(ci->fscache, page, i_size_read(inode), in ceph_readpage_to_fscache()
308 fscache_uncache_page(ci->fscache, page); in ceph_readpage_to_fscache()
313 struct ceph_inode_info *ci = ceph_inode(inode); in ceph_invalidate_fscache_page() local
318 fscache_wait_on_page_write(ci->fscache, page); in ceph_invalidate_fscache_page()
319 fscache_uncache_page(ci->fscache, page); in ceph_invalidate_fscache_page()
348 void ceph_fscache_revalidate_cookie(struct ceph_inode_info *ci) in ceph_fscache_revalidate_cookie() argument
350 if (cache_valid(ci)) in ceph_fscache_revalidate_cookie()
355 mutex_lock(&ci->i_truncate_mutex); in ceph_fscache_revalidate_cookie()
356 if (!cache_valid(ci)) { in ceph_fscache_revalidate_cookie()
357 if (fscache_check_consistency(ci->fscache, &ci->i_vino)) in ceph_fscache_revalidate_cookie()
358 fscache_invalidate(ci->fscache); in ceph_fscache_revalidate_cookie()
359 spin_lock(&ci->i_ceph_lock); in ceph_fscache_revalidate_cookie()
360 ci->i_fscache_gen = ci->i_rdcache_gen; in ceph_fscache_revalidate_cookie()
361 spin_unlock(&ci->i_ceph_lock); in ceph_fscache_revalidate_cookie()
363 mutex_unlock(&ci->i_truncate_mutex); in ceph_fscache_revalidate_cookie()