Lines Matching refs:ci
455 void ceph_queue_cap_snap(struct ceph_inode_info *ci) in ceph_queue_cap_snap() argument
457 struct inode *inode = &ci->vfs_inode; in ceph_queue_cap_snap()
468 spin_lock(&ci->i_ceph_lock); in ceph_queue_cap_snap()
469 used = __ceph_caps_used(ci); in ceph_queue_cap_snap()
470 dirty = __ceph_caps_dirty(ci); in ceph_queue_cap_snap()
472 old_snapc = ci->i_head_snapc; in ceph_queue_cap_snap()
473 new_snapc = ci->i_snap_realm->cached_context; in ceph_queue_cap_snap()
483 if (__ceph_have_pending_cap_snap(ci)) { in ceph_queue_cap_snap()
491 if (ci->i_wrbuffer_ref_head == 0 && in ceph_queue_cap_snap()
512 ci->i_wrbuffer_ref_head == 0) { in ceph_queue_cap_snap()
525 capsnap->ci = ci; in ceph_queue_cap_snap()
530 capsnap->issued = __ceph_caps_issued(ci, NULL); in ceph_queue_cap_snap()
538 __ceph_build_xattrs_blob(ci); in ceph_queue_cap_snap()
540 ceph_buffer_get(ci->i_xattrs.blob); in ceph_queue_cap_snap()
541 capsnap->xattr_version = ci->i_xattrs.version; in ceph_queue_cap_snap()
547 capsnap->inline_data = ci->i_inline_version != CEPH_INLINE_NONE; in ceph_queue_cap_snap()
552 capsnap->dirty_pages = ci->i_wrbuffer_ref_head; in ceph_queue_cap_snap()
553 ci->i_wrbuffer_ref_head = 0; in ceph_queue_cap_snap()
555 list_add_tail(&capsnap->ci_item, &ci->i_cap_snaps); in ceph_queue_cap_snap()
565 __ceph_finish_cap_snap(ci, capsnap); in ceph_queue_cap_snap()
570 if (ci->i_head_snapc) { in ceph_queue_cap_snap()
571 ci->i_head_snapc = ceph_get_snap_context(new_snapc); in ceph_queue_cap_snap()
574 spin_unlock(&ci->i_ceph_lock); in ceph_queue_cap_snap()
588 int __ceph_finish_cap_snap(struct ceph_inode_info *ci, in __ceph_finish_cap_snap() argument
591 struct inode *inode = &ci->vfs_inode; in __ceph_finish_cap_snap()
599 capsnap->time_warp_seq = ci->i_time_warp_seq; in __ceph_finish_cap_snap()
614 list_add_tail(&ci->i_snap_flush_item, &mdsc->snap_flush_list); in __ceph_finish_cap_snap()
625 struct ceph_inode_info *ci; in queue_realm_cap_snaps() local
632 list_for_each_entry(ci, &realm->inodes_with_caps, in queue_realm_cap_snaps()
634 struct inode *inode = igrab(&ci->vfs_inode); in queue_realm_cap_snaps()
640 ceph_queue_cap_snap(ci); in queue_realm_cap_snaps()
792 struct ceph_inode_info *ci; in flush_snaps() local
799 ci = list_first_entry(&mdsc->snap_flush_list, in flush_snaps()
801 inode = &ci->vfs_inode; in flush_snaps()
804 spin_lock(&ci->i_ceph_lock); in flush_snaps()
805 __ceph_flush_snaps(ci, &session, 0); in flush_snaps()
806 spin_unlock(&ci->i_ceph_lock); in flush_snaps()
904 struct ceph_inode_info *ci; in ceph_handle_snap() local
909 ci = ceph_inode(inode); in ceph_handle_snap()
911 spin_lock(&ci->i_ceph_lock); in ceph_handle_snap()
912 if (!ci->i_snap_realm) in ceph_handle_snap()
921 if (ci->i_snap_realm->created > in ceph_handle_snap()
924 inode, ci->i_snap_realm->ino, in ceph_handle_snap()
925 ci->i_snap_realm); in ceph_handle_snap()
934 list_del_init(&ci->i_snap_realm_item); in ceph_handle_snap()
935 list_add(&ci->i_snap_realm_item, in ceph_handle_snap()
937 oldrealm = ci->i_snap_realm; in ceph_handle_snap()
938 ci->i_snap_realm = realm; in ceph_handle_snap()
940 spin_unlock(&ci->i_ceph_lock); in ceph_handle_snap()
949 spin_unlock(&ci->i_ceph_lock); in ceph_handle_snap()