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()
94 snapc = ceph_get_snap_context(ci->i_snap_realm->cached_context); in ceph_set_page_dirty()
97 spin_lock(&ci->i_ceph_lock); in ceph_set_page_dirty()
98 if (ci->i_head_snapc == NULL) in ceph_set_page_dirty()
99 ci->i_head_snapc = ceph_get_snap_context(snapc); in ceph_set_page_dirty()
100 ++ci->i_wrbuffer_ref_head; in ceph_set_page_dirty()
101 if (ci->i_wrbuffer_ref == 0) in ceph_set_page_dirty()
103 ++ci->i_wrbuffer_ref; in ceph_set_page_dirty()
107 ci->i_wrbuffer_ref-1, ci->i_wrbuffer_ref_head-1, in ceph_set_page_dirty()
108 ci->i_wrbuffer_ref, ci->i_wrbuffer_ref_head, in ceph_set_page_dirty()
110 spin_unlock(&ci->i_ceph_lock); in ceph_set_page_dirty()
136 struct ceph_inode_info *ci; in ceph_invalidatepage() local
140 ci = ceph_inode(inode); in ceph_invalidatepage()
166 ceph_put_wrbuffer_cap_refs(ci, 1, snapc); in ceph_invalidatepage()
191 struct ceph_inode_info *ci = ceph_inode(inode); in readpage_nounlock() local
204 if (ci->i_inline_version != CEPH_INLINE_NONE) { in readpage_nounlock()
222 err = ceph_osdc_readpages(osdc, ceph_vino(inode), &ci->i_layout, in readpage_nounlock()
224 ci->i_truncate_seq, ci->i_truncate_size, in readpage_nounlock()
311 struct ceph_inode_info *ci = ceph_inode(inode); in start_read() local
339 req = ceph_osdc_new_request(osdc, &ci->i_layout, vino, off, &len, in start_read()
342 ci->i_truncate_seq, ci->i_truncate_size, in start_read()
441 struct ceph_inode_info *ci = ceph_inode(inode); in get_oldest_context() local
445 spin_lock(&ci->i_ceph_lock); in get_oldest_context()
446 list_for_each_entry(capsnap, &ci->i_cap_snaps, ci_item) { in get_oldest_context()
456 if (!snapc && ci->i_wrbuffer_ref_head) { in get_oldest_context()
457 snapc = ceph_get_snap_context(ci->i_head_snapc); in get_oldest_context()
459 snapc, ci->i_wrbuffer_ref_head); in get_oldest_context()
461 spin_unlock(&ci->i_ceph_lock); in get_oldest_context()
474 struct ceph_inode_info *ci; in writepage_nounlock() local
491 ci = ceph_inode(inode); in writepage_nounlock()
512 spin_lock(&ci->i_ceph_lock); in writepage_nounlock()
513 truncate_seq = ci->i_truncate_seq; in writepage_nounlock()
514 truncate_size = ci->i_truncate_size; in writepage_nounlock()
517 spin_unlock(&ci->i_ceph_lock); in writepage_nounlock()
539 &ci->i_layout, snapc, in writepage_nounlock()
556 ceph_put_wrbuffer_cap_refs(ci, 1, snapc); in writepage_nounlock()
602 struct ceph_inode_info *ci = ceph_inode(inode); in writepages_finish() local
614 unsigned issued = ceph_caps_issued(ci); in writepages_finish()
666 ceph_put_wrbuffer_cap_refs(ci, num_pages, snapc); in writepages_finish()
684 struct ceph_inode_info *ci = ceph_inode(inode); in ceph_writepages_start() local
707 ceph_caps_revoking(ci, CEPH_CAP_FILE_BUFFER)) in ceph_writepages_start()
757 spin_lock(&ci->i_ceph_lock); in ceph_writepages_start()
758 truncate_seq = ci->i_truncate_seq; in ceph_writepages_start()
759 truncate_size = ci->i_truncate_size; in ceph_writepages_start()
762 spin_unlock(&ci->i_ceph_lock); in ceph_writepages_start()
872 &ci->i_layout, vino, in ceph_writepages_start()
1034 struct ceph_inode_info *ci = ceph_inode(inode); in ceph_update_writeable_page() local
1048 BUG_ON(!ci->i_snap_realm); in ceph_update_writeable_page()
1050 BUG_ON(!ci->i_snap_realm->cached_context); in ceph_update_writeable_page()
1052 if (snapc && snapc != ci->i_head_snapc) { in ceph_update_writeable_page()
1071 r = wait_event_interruptible(ci->i_cap_wq, in ceph_update_writeable_page()
1232 struct ceph_inode_info *ci = ceph_inode(inode); in ceph_filemap_fault() local
1246 ret = ceph_get_caps(ci, CEPH_CAP_FILE_RD, want, in ceph_filemap_fault()
1259 ci->i_inline_version == CEPH_INLINE_NONE) in ceph_filemap_fault()
1268 ceph_put_cap_refs(ci, got); in ceph_filemap_fault()
1315 struct ceph_inode_info *ci = ceph_inode(inode); in ceph_page_mkwrite() local
1324 if (ci->i_inline_version != CEPH_INLINE_NONE) { in ceph_page_mkwrite()
1350 ret = ceph_get_caps(ci, CEPH_CAP_FILE_WR, want, off + len, in ceph_page_mkwrite()
1388 ci->i_inline_version != CEPH_INLINE_NONE) { in ceph_page_mkwrite()
1390 spin_lock(&ci->i_ceph_lock); in ceph_page_mkwrite()
1391 ci->i_inline_version = CEPH_INLINE_NONE; in ceph_page_mkwrite()
1392 dirty = __ceph_mark_dirty_caps(ci, CEPH_CAP_FILE_WR); in ceph_page_mkwrite()
1393 spin_unlock(&ci->i_ceph_lock); in ceph_page_mkwrite()
1400 ceph_put_cap_refs(ci, got); in ceph_page_mkwrite()
1451 struct ceph_inode_info *ci = ceph_inode(inode); in ceph_uninline_data() local
1459 spin_lock(&ci->i_ceph_lock); in ceph_uninline_data()
1460 inline_version = ci->i_inline_version; in ceph_uninline_data()
1461 spin_unlock(&ci->i_ceph_lock); in ceph_uninline_data()
1473 } else if (ceph_caps_issued(ci) & in ceph_uninline_data()
1508 req = ceph_osdc_new_request(&fsc->client->osdc, &ci->i_layout, in ceph_uninline_data()
1512 ci->i_snap_realm->cached_context, in ceph_uninline_data()
1527 req = ceph_osdc_new_request(&fsc->client->osdc, &ci->i_layout, in ceph_uninline_data()
1531 ci->i_snap_realm->cached_context, in ceph_uninline_data()
1532 ci->i_truncate_seq, ci->i_truncate_size, in ceph_uninline_data()