Lines Matching refs:ci

154 	struct ceph_inode_info *ci;  member
526 struct ceph_inode_info *ci = ceph_inode(inode); in ceph_ino_compare() local
527 return ci->i_vino.ino == pvino->ino && in ceph_ino_compare()
528 ci->i_vino.snap == pvino->snap; in ceph_ino_compare()
602 static inline void ceph_set_error_write(struct ceph_inode_info *ci) in ceph_set_error_write() argument
604 if (!(READ_ONCE(ci->i_ceph_flags) & CEPH_I_ERROR_WRITE)) { in ceph_set_error_write()
605 spin_lock(&ci->i_ceph_lock); in ceph_set_error_write()
606 ci->i_ceph_flags |= CEPH_I_ERROR_WRITE; in ceph_set_error_write()
607 spin_unlock(&ci->i_ceph_lock); in ceph_set_error_write()
611 static inline void ceph_clear_error_write(struct ceph_inode_info *ci) in ceph_clear_error_write() argument
613 if (READ_ONCE(ci->i_ceph_flags) & CEPH_I_ERROR_WRITE) { in ceph_clear_error_write()
614 spin_lock(&ci->i_ceph_lock); in ceph_clear_error_write()
615 ci->i_ceph_flags &= ~CEPH_I_ERROR_WRITE; in ceph_clear_error_write()
616 spin_unlock(&ci->i_ceph_lock); in ceph_clear_error_write()
620 static inline void __ceph_dir_set_complete(struct ceph_inode_info *ci, in __ceph_dir_set_complete() argument
630 atomic64_set(&ci->i_complete_seq[0], release_count); in __ceph_dir_set_complete()
631 atomic64_set(&ci->i_complete_seq[1], ordered_count); in __ceph_dir_set_complete()
634 static inline void __ceph_dir_clear_complete(struct ceph_inode_info *ci) in __ceph_dir_clear_complete() argument
636 atomic64_inc(&ci->i_release_count); in __ceph_dir_clear_complete()
639 static inline void __ceph_dir_clear_ordered(struct ceph_inode_info *ci) in __ceph_dir_clear_ordered() argument
641 atomic64_inc(&ci->i_ordered_count); in __ceph_dir_clear_ordered()
644 static inline bool __ceph_dir_is_complete(struct ceph_inode_info *ci) in __ceph_dir_is_complete() argument
646 return atomic64_read(&ci->i_complete_seq[0]) == in __ceph_dir_is_complete()
647 atomic64_read(&ci->i_release_count); in __ceph_dir_is_complete()
650 static inline bool __ceph_dir_is_complete_ordered(struct ceph_inode_info *ci) in __ceph_dir_is_complete_ordered() argument
652 return atomic64_read(&ci->i_complete_seq[0]) == in __ceph_dir_is_complete_ordered()
653 atomic64_read(&ci->i_release_count) && in __ceph_dir_is_complete_ordered()
654 atomic64_read(&ci->i_complete_seq[1]) == in __ceph_dir_is_complete_ordered()
655 atomic64_read(&ci->i_ordered_count); in __ceph_dir_is_complete_ordered()
676 extern struct ceph_inode_frag *__ceph_find_frag(struct ceph_inode_info *ci,
683 extern u32 ceph_choose_frag(struct ceph_inode_info *ci, u32 v,
695 static inline bool __ceph_is_any_real_caps(struct ceph_inode_info *ci) in __ceph_is_any_real_caps() argument
697 return !RB_EMPTY_ROOT(&ci->i_caps); in __ceph_is_any_real_caps()
700 extern int __ceph_caps_issued(struct ceph_inode_info *ci, int *implemented);
701 extern int __ceph_caps_issued_mask(struct ceph_inode_info *ci, int mask, int t);
702 extern int __ceph_caps_issued_mask_metric(struct ceph_inode_info *ci, int mask,
704 extern int __ceph_caps_issued_other(struct ceph_inode_info *ci,
707 static inline int ceph_caps_issued(struct ceph_inode_info *ci) in ceph_caps_issued() argument
710 spin_lock(&ci->i_ceph_lock); in ceph_caps_issued()
711 issued = __ceph_caps_issued(ci, NULL); in ceph_caps_issued()
712 spin_unlock(&ci->i_ceph_lock); in ceph_caps_issued()
716 static inline int ceph_caps_issued_mask_metric(struct ceph_inode_info *ci, in ceph_caps_issued_mask_metric() argument
720 spin_lock(&ci->i_ceph_lock); in ceph_caps_issued_mask_metric()
721 r = __ceph_caps_issued_mask_metric(ci, mask, touch); in ceph_caps_issued_mask_metric()
722 spin_unlock(&ci->i_ceph_lock); in ceph_caps_issued_mask_metric()
726 static inline int __ceph_caps_dirty(struct ceph_inode_info *ci) in __ceph_caps_dirty() argument
728 return ci->i_dirty_caps | ci->i_flushing_caps; in __ceph_caps_dirty()
732 extern int __ceph_mark_dirty_caps(struct ceph_inode_info *ci, int mask,
735 extern int __ceph_caps_revoking_other(struct ceph_inode_info *ci,
737 extern int ceph_caps_revoking(struct ceph_inode_info *ci, int mask);
738 extern int __ceph_caps_used(struct ceph_inode_info *ci);
740 static inline bool __ceph_is_file_opened(struct ceph_inode_info *ci) in __ceph_is_file_opened() argument
742 return ci->i_nr_by_mode[0]; in __ceph_is_file_opened()
744 extern int __ceph_caps_file_wanted(struct ceph_inode_info *ci);
745 extern int __ceph_caps_wanted(struct ceph_inode_info *ci);
748 extern int __ceph_caps_mds_wanted(struct ceph_inode_info *ci, bool check);
934 extern int __ceph_finish_cap_snap(struct ceph_inode_info *ci,
951 static inline bool __ceph_have_pending_cap_snap(struct ceph_inode_info *ci) in __ceph_have_pending_cap_snap() argument
953 return !list_empty(&ci->i_cap_snaps) && in __ceph_have_pending_cap_snap()
954 list_last_entry(&ci->i_cap_snaps, struct ceph_cap_snap, in __ceph_have_pending_cap_snap()
1048 extern struct ceph_buffer *__ceph_build_xattrs_blob(struct ceph_inode_info *ci);
1049 extern void __ceph_destroy_xattrs(struct ceph_inode_info *ci);
1152 extern void __ceph_remove_caps(struct ceph_inode_info *ci);
1165 struct ceph_inode_info *ci);
1166 extern struct ceph_cap *ceph_get_cap_for_mds(struct ceph_inode_info *ci,
1168 extern void ceph_take_cap_refs(struct ceph_inode_info *ci, int caps,
1170 extern void ceph_get_cap_refs(struct ceph_inode_info *ci, int caps);
1171 extern void ceph_put_cap_refs(struct ceph_inode_info *ci, int had);
1172 extern void ceph_put_cap_refs_async(struct ceph_inode_info *ci, int had);
1173 extern void ceph_put_cap_refs_no_check_caps(struct ceph_inode_info *ci,
1175 extern void ceph_put_wrbuffer_cap_refs(struct ceph_inode_info *ci, int nr,
1183 extern void ceph_flush_snaps(struct ceph_inode_info *ci,
1185 extern bool __ceph_should_report_size(struct ceph_inode_info *ci);
1186 extern void ceph_check_caps(struct ceph_inode_info *ci, int flags,
1203 extern void ceph_get_fmode(struct ceph_inode_info *ci, int mode, int count);
1204 extern void ceph_put_fmode(struct ceph_inode_info *ci, int mode, int count);
1205 extern void __ceph_touch_fmode(struct ceph_inode_info *ci,
1273 static inline bool __ceph_has_any_quota(struct ceph_inode_info *ci) in __ceph_has_any_quota() argument
1275 return ci->i_max_files || ci->i_max_bytes; in __ceph_has_any_quota()
1280 static inline void __ceph_update_quota(struct ceph_inode_info *ci, in __ceph_update_quota() argument
1284 had_quota = __ceph_has_any_quota(ci); in __ceph_update_quota()
1285 ci->i_max_bytes = max_bytes; in __ceph_update_quota()
1286 ci->i_max_files = max_files; in __ceph_update_quota()
1287 has_quota = __ceph_has_any_quota(ci); in __ceph_update_quota()
1290 ceph_adjust_quota_realms_count(&ci->vfs_inode, has_quota); in __ceph_update_quota()