Lines Matching refs:ci

147 	struct ceph_inode_info *ci;  member
492 struct ceph_inode_info *ci = ceph_inode(inode); in ceph_ino_compare() local
493 return ci->i_vino.ino == pvino->ino && in ceph_ino_compare()
494 ci->i_vino.snap == pvino->snap; in ceph_ino_compare()
536 static inline void ceph_set_error_write(struct ceph_inode_info *ci) in ceph_set_error_write() argument
538 if (!(READ_ONCE(ci->i_ceph_flags) & CEPH_I_ERROR_WRITE)) { in ceph_set_error_write()
539 spin_lock(&ci->i_ceph_lock); in ceph_set_error_write()
540 ci->i_ceph_flags |= CEPH_I_ERROR_WRITE; in ceph_set_error_write()
541 spin_unlock(&ci->i_ceph_lock); in ceph_set_error_write()
545 static inline void ceph_clear_error_write(struct ceph_inode_info *ci) in ceph_clear_error_write() argument
547 if (READ_ONCE(ci->i_ceph_flags) & CEPH_I_ERROR_WRITE) { in ceph_clear_error_write()
548 spin_lock(&ci->i_ceph_lock); in ceph_clear_error_write()
549 ci->i_ceph_flags &= ~CEPH_I_ERROR_WRITE; in ceph_clear_error_write()
550 spin_unlock(&ci->i_ceph_lock); in ceph_clear_error_write()
554 static inline void __ceph_dir_set_complete(struct ceph_inode_info *ci, in __ceph_dir_set_complete() argument
564 atomic64_set(&ci->i_complete_seq[0], release_count); in __ceph_dir_set_complete()
565 atomic64_set(&ci->i_complete_seq[1], ordered_count); in __ceph_dir_set_complete()
568 static inline void __ceph_dir_clear_complete(struct ceph_inode_info *ci) in __ceph_dir_clear_complete() argument
570 atomic64_inc(&ci->i_release_count); in __ceph_dir_clear_complete()
573 static inline void __ceph_dir_clear_ordered(struct ceph_inode_info *ci) in __ceph_dir_clear_ordered() argument
575 atomic64_inc(&ci->i_ordered_count); in __ceph_dir_clear_ordered()
578 static inline bool __ceph_dir_is_complete(struct ceph_inode_info *ci) in __ceph_dir_is_complete() argument
580 return atomic64_read(&ci->i_complete_seq[0]) == in __ceph_dir_is_complete()
581 atomic64_read(&ci->i_release_count); in __ceph_dir_is_complete()
584 static inline bool __ceph_dir_is_complete_ordered(struct ceph_inode_info *ci) in __ceph_dir_is_complete_ordered() argument
586 return atomic64_read(&ci->i_complete_seq[0]) == in __ceph_dir_is_complete_ordered()
587 atomic64_read(&ci->i_release_count) && in __ceph_dir_is_complete_ordered()
588 atomic64_read(&ci->i_complete_seq[1]) == in __ceph_dir_is_complete_ordered()
589 atomic64_read(&ci->i_ordered_count); in __ceph_dir_is_complete_ordered()
610 extern struct ceph_inode_frag *__ceph_find_frag(struct ceph_inode_info *ci,
617 extern u32 ceph_choose_frag(struct ceph_inode_info *ci, u32 v,
629 static inline bool __ceph_is_any_real_caps(struct ceph_inode_info *ci) in __ceph_is_any_real_caps() argument
631 return !RB_EMPTY_ROOT(&ci->i_caps); in __ceph_is_any_real_caps()
634 extern int __ceph_caps_issued(struct ceph_inode_info *ci, int *implemented);
635 extern int __ceph_caps_issued_mask(struct ceph_inode_info *ci, int mask, int t);
636 extern int __ceph_caps_issued_other(struct ceph_inode_info *ci,
639 static inline int ceph_caps_issued(struct ceph_inode_info *ci) in ceph_caps_issued() argument
642 spin_lock(&ci->i_ceph_lock); in ceph_caps_issued()
643 issued = __ceph_caps_issued(ci, NULL); in ceph_caps_issued()
644 spin_unlock(&ci->i_ceph_lock); in ceph_caps_issued()
648 static inline int ceph_caps_issued_mask(struct ceph_inode_info *ci, int mask, in ceph_caps_issued_mask() argument
652 spin_lock(&ci->i_ceph_lock); in ceph_caps_issued_mask()
653 r = __ceph_caps_issued_mask(ci, mask, touch); in ceph_caps_issued_mask()
654 spin_unlock(&ci->i_ceph_lock); in ceph_caps_issued_mask()
658 static inline int __ceph_caps_dirty(struct ceph_inode_info *ci) in __ceph_caps_dirty() argument
660 return ci->i_dirty_caps | ci->i_flushing_caps; in __ceph_caps_dirty()
664 extern int __ceph_mark_dirty_caps(struct ceph_inode_info *ci, int mask,
667 extern int __ceph_caps_revoking_other(struct ceph_inode_info *ci,
669 extern int ceph_caps_revoking(struct ceph_inode_info *ci, int mask);
670 extern int __ceph_caps_used(struct ceph_inode_info *ci);
672 extern int __ceph_caps_file_wanted(struct ceph_inode_info *ci);
677 static inline int __ceph_caps_wanted(struct ceph_inode_info *ci) in __ceph_caps_wanted() argument
679 int w = __ceph_caps_file_wanted(ci) | __ceph_caps_used(ci); in __ceph_caps_wanted()
686 extern int __ceph_caps_mds_wanted(struct ceph_inode_info *ci, bool check);
872 extern void ceph_queue_cap_snap(struct ceph_inode_info *ci);
873 extern int __ceph_finish_cap_snap(struct ceph_inode_info *ci,
889 static inline bool __ceph_have_pending_cap_snap(struct ceph_inode_info *ci) in __ceph_have_pending_cap_snap() argument
891 return !list_empty(&ci->i_cap_snaps) && in __ceph_have_pending_cap_snap()
892 list_last_entry(&ci->i_cap_snaps, struct ceph_cap_snap, in __ceph_have_pending_cap_snap()
942 extern struct ceph_buffer *__ceph_build_xattrs_blob(struct ceph_inode_info *ci);
943 extern void __ceph_destroy_xattrs(struct ceph_inode_info *ci);
1044 extern void __ceph_remove_caps(struct ceph_inode_info *ci);
1056 extern struct ceph_cap *ceph_get_cap_for_mds(struct ceph_inode_info *ci,
1058 extern void ceph_get_cap_refs(struct ceph_inode_info *ci, int caps);
1059 extern void ceph_put_cap_refs(struct ceph_inode_info *ci, int had);
1060 extern void ceph_put_wrbuffer_cap_refs(struct ceph_inode_info *ci, int nr,
1062 extern void ceph_flush_snaps(struct ceph_inode_info *ci,
1064 extern bool __ceph_should_report_size(struct ceph_inode_info *ci);
1065 extern void ceph_check_caps(struct ceph_inode_info *ci, int flags,
1082 extern void __ceph_get_fmode(struct ceph_inode_info *ci, int mode);
1083 extern void ceph_put_fmode(struct ceph_inode_info *ci, int mode);
1149 static inline bool __ceph_has_any_quota(struct ceph_inode_info *ci) in __ceph_has_any_quota() argument
1151 return ci->i_max_files || ci->i_max_bytes; in __ceph_has_any_quota()
1156 static inline void __ceph_update_quota(struct ceph_inode_info *ci, in __ceph_update_quota() argument
1160 had_quota = __ceph_has_any_quota(ci); in __ceph_update_quota()
1161 ci->i_max_bytes = max_bytes; in __ceph_update_quota()
1162 ci->i_max_files = max_files; in __ceph_update_quota()
1163 has_quota = __ceph_has_any_quota(ci); in __ceph_update_quota()
1166 ceph_adjust_quota_realms_count(&ci->vfs_inode, has_quota); in __ceph_update_quota()