Lines Matching full:ci

87 	struct ceph_inode_info *ci;  in ceph_dirty_folio()  local
99 ci = ceph_inode(inode); in ceph_dirty_folio()
102 spin_lock(&ci->i_ceph_lock); in ceph_dirty_folio()
103 if (__ceph_have_pending_cap_snap(ci)) { in ceph_dirty_folio()
105 list_last_entry(&ci->i_cap_snaps, in ceph_dirty_folio()
111 BUG_ON(!ci->i_head_snapc); in ceph_dirty_folio()
112 snapc = ceph_get_snap_context(ci->i_head_snapc); in ceph_dirty_folio()
113 ++ci->i_wrbuffer_ref_head; in ceph_dirty_folio()
115 if (ci->i_wrbuffer_ref == 0) in ceph_dirty_folio()
117 ++ci->i_wrbuffer_ref; in ceph_dirty_folio()
121 ci->i_wrbuffer_ref-1, ci->i_wrbuffer_ref_head-1, in ceph_dirty_folio()
122 ci->i_wrbuffer_ref, ci->i_wrbuffer_ref_head, in ceph_dirty_folio()
124 spin_unlock(&ci->i_ceph_lock); in ceph_dirty_folio()
146 struct ceph_inode_info *ci = ceph_inode(inode); in ceph_invalidate_folio() local
162 ceph_put_wrbuffer_cap_refs(ci, 1, snapc); in ceph_invalidate_folio()
172 struct ceph_inode_info *ci = ceph_inode(inode); in ceph_netfs_expand_readahead() local
173 struct ceph_file_layout *lo = &ci->i_layout; in ceph_netfs_expand_readahead()
288 struct ceph_inode_info *ci = ceph_inode(inode); in ceph_netfs_issue_op_inline() local
308 req->r_ino1 = ci->i_vino; in ceph_netfs_issue_op_inline()
346 struct ceph_inode_info *ci = ceph_inode(inode); in ceph_netfs_prepare_read() local
352 ceph_calc_file_object_mapping(&ci->i_layout, subreq->start, subreq->len, in ceph_netfs_prepare_read()
362 struct ceph_inode_info *ci = ceph_inode(inode); in ceph_netfs_issue_read() local
378 if (ceph_has_inline_data(ci) && ceph_netfs_issue_op_inline(subreq)) in ceph_netfs_issue_read()
389 req = ceph_osdc_new_request(&fsc->client->osdc, &ci->i_layout, vino, in ceph_netfs_issue_read()
391 CEPH_OSD_FLAG_READ, NULL, ci->i_truncate_seq, in ceph_netfs_issue_read()
392 ci->i_truncate_size, false); in ceph_netfs_issue_read()
571 struct ceph_inode_info *ci = ceph_inode(inode); in ceph_fscache_write_to_cache() local
572 struct fscache_cookie *cookie = ceph_fscache_cookie(ci); in ceph_fscache_write_to_cache()
633 struct ceph_inode_info *ci = ceph_inode(inode); in get_oldest_context() local
638 spin_lock(&ci->i_ceph_lock); in get_oldest_context()
639 list_for_each_entry(capsnap, &ci->i_cap_snaps, ci_item) { in get_oldest_context()
671 if (!snapc && ci->i_wrbuffer_ref_head) { in get_oldest_context()
672 snapc = ceph_get_snap_context(ci->i_head_snapc); in get_oldest_context()
674 ci->i_wrbuffer_ref_head); in get_oldest_context()
677 ctl->truncate_size = ci->i_truncate_size; in get_oldest_context()
678 ctl->truncate_seq = ci->i_truncate_seq; in get_oldest_context()
683 spin_unlock(&ci->i_ceph_lock); in get_oldest_context()
690 struct ceph_inode_info *ci = ceph_inode(inode); in get_writepages_data_length() local
697 if (snapc != ci->i_head_snapc) { in get_writepages_data_length()
699 spin_lock(&ci->i_ceph_lock); in get_writepages_data_length()
700 list_for_each_entry(capsnap, &ci->i_cap_snaps, ci_item) { in get_writepages_data_length()
708 spin_unlock(&ci->i_ceph_lock); in get_writepages_data_length()
730 struct ceph_inode_info *ci = ceph_inode(inode); in write_folio_nounlock() local
789 req = ceph_osdc_new_request(osdc, &ci->i_layout, ceph_vino(inode), in write_folio_nounlock()
841 ceph_subvolume_metrics_record_io(fsc->mdsc, ci, true, len, in write_folio_nounlock()
878 ceph_put_wrbuffer_cap_refs(ci, 1, snapc); in write_folio_nounlock()
897 struct ceph_inode_info *ci = ceph_inode(inode); in writepages_finish() local
914 ceph_set_error_write(ci); in writepages_finish()
918 ceph_clear_error_write(ci); in writepages_finish()
927 remove_page = !(ceph_caps_issued(ci) & in writepages_finish()
988 ceph_subvolume_metrics_record_io(mdsc, ci, true, len, in writepages_finish()
992 ceph_put_wrbuffer_cap_refs(ci, total_pages, snapc); in writepages_finish()
1007 struct ceph_inode_info *ci = ceph_inode(inode); in is_forced_umount() local
1012 if (ci->i_wrbuffer_ref > 0) { in is_forced_umount()
1029 struct ceph_inode_info *ci = ceph_inode(inode); in ceph_define_write_size() local
1030 unsigned int wsize = ci->i_layout.stripe_unit; in ceph_define_write_size()
1229 struct ceph_inode_info *ci = ceph_inode(inode); in ceph_allocate_page_array() local
1236 ceph_calc_file_object_mapping(&ci->i_layout, in ceph_allocate_page_array()
1448 struct ceph_inode_info *ci = ceph_inode(inode); in ceph_submit_write() local
1464 &ci->i_layout, vino, in ceph_submit_write()
1471 &ci->i_layout, vino, in ceph_submit_write()
1828 struct ceph_inode_info *ci = ceph_inode(inode); in ceph_find_incompatible() local
1842 if (!snapc || snapc == ci->i_head_snapc) in ceph_find_incompatible()
1875 struct ceph_inode_info *ci = ceph_inode(inode); in ceph_netfs_check_write_begin() local
1889 r = wait_event_killable(ci->i_cap_wq, in ceph_netfs_check_write_begin()
1908 struct ceph_inode_info *ci = ceph_inode(inode); in ceph_write_begin() local
1911 r = netfs_write_begin(&ci->netfs, file, inode->i_mapping, pos, len, foliop, NULL); in ceph_write_begin()
1994 struct ceph_inode_info *ci = ceph_inode(inode); in ceph_filemap_fault() local
2023 !ceph_has_inline_data(ci)) { in ceph_filemap_fault()
2033 ceph_put_cap_refs(ci, got); in ceph_filemap_fault()
2086 struct ceph_inode_info *ci = ceph_inode(inode); in ceph_page_mkwrite() local
2158 err = wait_event_killable(ci->i_cap_wq, in ceph_page_mkwrite()
2165 spin_lock(&ci->i_ceph_lock); in ceph_page_mkwrite()
2166 dirty = __ceph_mark_dirty_caps(ci, CEPH_CAP_FILE_WR, in ceph_page_mkwrite()
2168 spin_unlock(&ci->i_ceph_lock); in ceph_page_mkwrite()
2175 ceph_put_cap_refs_async(ci, got); in ceph_page_mkwrite()
2233 struct ceph_inode_info *ci = ceph_inode(inode); in ceph_uninline_data() local
2245 spin_lock(&ci->i_ceph_lock); in ceph_uninline_data()
2246 inline_version = ci->i_inline_version; in ceph_uninline_data()
2247 spin_unlock(&ci->i_ceph_lock); in ceph_uninline_data()
2268 spin_lock(&ci->i_ceph_lock); in ceph_uninline_data()
2269 if (__ceph_have_pending_cap_snap(ci)) { in ceph_uninline_data()
2271 list_last_entry(&ci->i_cap_snaps, in ceph_uninline_data()
2276 if (!ci->i_head_snapc) { in ceph_uninline_data()
2277 ci->i_head_snapc = ceph_get_snap_context( in ceph_uninline_data()
2278 ci->i_snap_realm->cached_context); in ceph_uninline_data()
2280 snapc = ceph_get_snap_context(ci->i_head_snapc); in ceph_uninline_data()
2282 spin_unlock(&ci->i_ceph_lock); in ceph_uninline_data()
2297 req = ceph_osdc_new_request(&fsc->client->osdc, &ci->i_layout, in ceph_uninline_data()
2313 req = ceph_osdc_new_request(&fsc->client->osdc, &ci->i_layout, in ceph_uninline_data()
2316 snapc, ci->i_truncate_seq, in ceph_uninline_data()
2317 ci->i_truncate_size, false); in ceph_uninline_data()
2361 spin_lock(&ci->i_ceph_lock); in ceph_uninline_data()
2362 ci->i_inline_version = CEPH_INLINE_NONE; in ceph_uninline_data()
2363 dirty = __ceph_mark_dirty_caps(ci, CEPH_CAP_FILE_WR, &prealloc_cf); in ceph_uninline_data()
2364 spin_unlock(&ci->i_ceph_lock); in ceph_uninline_data()
2406 static int __ceph_pool_perm_get(struct ceph_inode_info *ci, in __ceph_pool_perm_get() argument
2409 struct ceph_fs_client *fsc = ceph_inode_to_fs_client(&ci->netfs.inode); in __ceph_pool_perm_get()
2492 ceph_oid_printf(&rd_req->r_base_oid, "%llx.00000000", ci->i_vino.ino); in __ceph_pool_perm_get()
2525 wr_req->r_mtime = inode_get_mtime(&ci->netfs.inode); in __ceph_pool_perm_get()
2584 struct ceph_inode_info *ci = ceph_inode(inode); in ceph_pool_perm_check() local
2594 if (ci->i_vino.snap != CEPH_NOSNAP) { in ceph_pool_perm_check()
2607 spin_lock(&ci->i_ceph_lock); in ceph_pool_perm_check()
2608 flags = ci->i_ceph_flags; in ceph_pool_perm_check()
2609 pool = ci->i_layout.pool_id; in ceph_pool_perm_check()
2610 spin_unlock(&ci->i_ceph_lock); in ceph_pool_perm_check()
2624 pool_ns = ceph_try_get_string(ci->i_layout.pool_ns); in ceph_pool_perm_check()
2625 ret = __ceph_pool_perm_get(ci, pool, pool_ns); in ceph_pool_perm_check()
2630 spin_lock(&ci->i_ceph_lock); in ceph_pool_perm_check()
2631 if (pool == ci->i_layout.pool_id && in ceph_pool_perm_check()
2632 pool_ns == rcu_dereference_raw(ci->i_layout.pool_ns)) { in ceph_pool_perm_check()
2633 set_bit(CEPH_I_POOL_PERM_BIT, &ci->i_ceph_flags); in ceph_pool_perm_check()
2635 set_bit(CEPH_I_POOL_RD_BIT, &ci->i_ceph_flags); in ceph_pool_perm_check()
2637 set_bit(CEPH_I_POOL_WR_BIT, &ci->i_ceph_flags); in ceph_pool_perm_check()
2639 pool = ci->i_layout.pool_id; in ceph_pool_perm_check()
2642 flags = ci->i_ceph_flags; in ceph_pool_perm_check()
2643 spin_unlock(&ci->i_ceph_lock); in ceph_pool_perm_check()