Lines Matching refs:ci
73 struct ceph_inode_info *ci; in ceph_set_page_dirty() local
88 ci = ceph_inode(inode); in ceph_set_page_dirty()
91 spin_lock(&ci->i_ceph_lock); in ceph_set_page_dirty()
92 BUG_ON(ci->i_wr_ref == 0); // caller should hold Fw reference in ceph_set_page_dirty()
93 if (__ceph_have_pending_cap_snap(ci)) { in ceph_set_page_dirty()
95 list_last_entry(&ci->i_cap_snaps, in ceph_set_page_dirty()
101 BUG_ON(!ci->i_head_snapc); in ceph_set_page_dirty()
102 snapc = ceph_get_snap_context(ci->i_head_snapc); in ceph_set_page_dirty()
103 ++ci->i_wrbuffer_ref_head; in ceph_set_page_dirty()
105 if (ci->i_wrbuffer_ref == 0) in ceph_set_page_dirty()
107 ++ci->i_wrbuffer_ref; in ceph_set_page_dirty()
111 ci->i_wrbuffer_ref-1, ci->i_wrbuffer_ref_head-1, in ceph_set_page_dirty()
112 ci->i_wrbuffer_ref, ci->i_wrbuffer_ref_head, in ceph_set_page_dirty()
114 spin_unlock(&ci->i_ceph_lock); in ceph_set_page_dirty()
140 struct ceph_inode_info *ci; in ceph_invalidatepage() local
144 ci = ceph_inode(inode); in ceph_invalidatepage()
170 ceph_put_wrbuffer_cap_refs(ci, 1, snapc); in ceph_invalidatepage()
195 struct ceph_inode_info *ci = ceph_inode(inode); in readpage_nounlock() local
208 if (ci->i_inline_version != CEPH_INLINE_NONE) { in readpage_nounlock()
226 err = ceph_osdc_readpages(osdc, ceph_vino(inode), &ci->i_layout, in readpage_nounlock()
228 ci->i_truncate_seq, ci->i_truncate_size, in readpage_nounlock()
315 struct ceph_inode_info *ci = ceph_inode(inode); in start_read() local
343 req = ceph_osdc_new_request(osdc, &ci->i_layout, vino, off, &len, in start_read()
346 ci->i_truncate_seq, ci->i_truncate_size, in start_read()
445 struct ceph_inode_info *ci = ceph_inode(inode); in get_oldest_context() local
449 spin_lock(&ci->i_ceph_lock); in get_oldest_context()
450 list_for_each_entry(capsnap, &ci->i_cap_snaps, ci_item) { in get_oldest_context()
460 if (!snapc && ci->i_wrbuffer_ref_head) { in get_oldest_context()
461 snapc = ceph_get_snap_context(ci->i_head_snapc); in get_oldest_context()
463 snapc, ci->i_wrbuffer_ref_head); in get_oldest_context()
465 spin_unlock(&ci->i_ceph_lock); in get_oldest_context()
478 struct ceph_inode_info *ci; in writepage_nounlock() local
496 ci = ceph_inode(inode); in writepage_nounlock()
517 spin_lock(&ci->i_ceph_lock); in writepage_nounlock()
518 truncate_seq = ci->i_truncate_seq; in writepage_nounlock()
519 truncate_size = ci->i_truncate_size; in writepage_nounlock()
522 spin_unlock(&ci->i_ceph_lock); in writepage_nounlock()
544 &ci->i_layout, snapc, in writepage_nounlock()
561 ceph_put_wrbuffer_cap_refs(ci, 1, snapc); in writepage_nounlock()
607 struct ceph_inode_info *ci = ceph_inode(inode); in writepages_finish() local
619 unsigned issued = ceph_caps_issued(ci); in writepages_finish()
671 ceph_put_wrbuffer_cap_refs(ci, num_pages, snapc); in writepages_finish()
689 struct ceph_inode_info *ci = ceph_inode(inode); in ceph_writepages_start() local
713 ceph_caps_revoking(ci, CEPH_CAP_FILE_BUFFER)) in ceph_writepages_start()
763 spin_lock(&ci->i_ceph_lock); in ceph_writepages_start()
764 truncate_seq = ci->i_truncate_seq; in ceph_writepages_start()
765 truncate_size = ci->i_truncate_size; in ceph_writepages_start()
767 spin_unlock(&ci->i_ceph_lock); in ceph_writepages_start()
879 &ci->i_layout, vino, in ceph_writepages_start()
1050 struct ceph_inode_info *ci = ceph_inode(inode); in ceph_update_writeable_page() local
1063 if (snapc && snapc != ci->i_head_snapc) { in ceph_update_writeable_page()
1081 r = wait_event_interruptible(ci->i_cap_wq, in ceph_update_writeable_page()
1237 struct ceph_inode_info *ci = ceph_inode(inode); in ceph_filemap_fault() local
1251 ret = ceph_get_caps(ci, CEPH_CAP_FILE_RD, want, in ceph_filemap_fault()
1264 ci->i_inline_version == CEPH_INLINE_NONE) in ceph_filemap_fault()
1273 ceph_put_cap_refs(ci, got); in ceph_filemap_fault()
1320 struct ceph_inode_info *ci = ceph_inode(inode); in ceph_page_mkwrite() local
1333 if (ci->i_inline_version != CEPH_INLINE_NONE) { in ceph_page_mkwrite()
1361 ret = ceph_get_caps(ci, CEPH_CAP_FILE_WR, want, off + len, in ceph_page_mkwrite()
1399 ci->i_inline_version != CEPH_INLINE_NONE) { in ceph_page_mkwrite()
1401 spin_lock(&ci->i_ceph_lock); in ceph_page_mkwrite()
1402 ci->i_inline_version = CEPH_INLINE_NONE; in ceph_page_mkwrite()
1403 dirty = __ceph_mark_dirty_caps(ci, CEPH_CAP_FILE_WR, in ceph_page_mkwrite()
1405 spin_unlock(&ci->i_ceph_lock); in ceph_page_mkwrite()
1412 ceph_put_cap_refs(ci, got); in ceph_page_mkwrite()
1466 struct ceph_inode_info *ci = ceph_inode(inode); in ceph_uninline_data() local
1474 spin_lock(&ci->i_ceph_lock); in ceph_uninline_data()
1475 inline_version = ci->i_inline_version; in ceph_uninline_data()
1476 spin_unlock(&ci->i_ceph_lock); in ceph_uninline_data()
1488 } else if (ceph_caps_issued(ci) & in ceph_uninline_data()
1523 req = ceph_osdc_new_request(&fsc->client->osdc, &ci->i_layout, in ceph_uninline_data()
1541 req = ceph_osdc_new_request(&fsc->client->osdc, &ci->i_layout, in ceph_uninline_data()
1546 ci->i_truncate_seq, ci->i_truncate_size, in ceph_uninline_data()
1620 static int __ceph_pool_perm_get(struct ceph_inode_info *ci, u32 pool) in __ceph_pool_perm_get() argument
1622 struct ceph_fs_client *fsc = ceph_inode_to_client(&ci->vfs_inode); in __ceph_pool_perm_get()
1680 "%llx.00000000", ci->i_vino.ino); in __ceph_pool_perm_get()
1707 &ci->vfs_inode.i_mtime); in __ceph_pool_perm_get()
1711 &ci->vfs_inode.i_mtime); in __ceph_pool_perm_get()
1756 int ceph_pool_perm_check(struct ceph_inode_info *ci, int need) in ceph_pool_perm_check() argument
1761 if (ceph_test_mount_opt(ceph_inode_to_client(&ci->vfs_inode), in ceph_pool_perm_check()
1765 spin_lock(&ci->i_ceph_lock); in ceph_pool_perm_check()
1766 flags = ci->i_ceph_flags; in ceph_pool_perm_check()
1767 pool = ceph_file_layout_pg_pool(ci->i_layout); in ceph_pool_perm_check()
1768 spin_unlock(&ci->i_ceph_lock); in ceph_pool_perm_check()
1784 ret = __ceph_pool_perm_get(ci, pool); in ceph_pool_perm_check()
1794 spin_lock(&ci->i_ceph_lock); in ceph_pool_perm_check()
1795 if (pool == ceph_file_layout_pg_pool(ci->i_layout)) { in ceph_pool_perm_check()
1796 ci->i_ceph_flags = flags; in ceph_pool_perm_check()
1798 pool = ceph_file_layout_pg_pool(ci->i_layout); in ceph_pool_perm_check()
1799 flags = ci->i_ceph_flags; in ceph_pool_perm_check()
1801 spin_unlock(&ci->i_ceph_lock); in ceph_pool_perm_check()