Lines Matching refs:ci
137 struct ceph_inode_info *ci; member
469 struct ceph_inode_info *ci = ceph_inode(inode); in ceph_ino_compare() local
470 return ci->i_vino.ino == pvino->ino && in ceph_ino_compare()
471 ci->i_vino.snap == pvino->snap; in ceph_ino_compare()
507 static inline void ceph_set_error_write(struct ceph_inode_info *ci) in ceph_set_error_write() argument
509 if (!(READ_ONCE(ci->i_ceph_flags) & CEPH_I_ERROR_WRITE)) { in ceph_set_error_write()
510 spin_lock(&ci->i_ceph_lock); in ceph_set_error_write()
511 ci->i_ceph_flags |= CEPH_I_ERROR_WRITE; in ceph_set_error_write()
512 spin_unlock(&ci->i_ceph_lock); in ceph_set_error_write()
516 static inline void ceph_clear_error_write(struct ceph_inode_info *ci) in ceph_clear_error_write() argument
518 if (READ_ONCE(ci->i_ceph_flags) & CEPH_I_ERROR_WRITE) { in ceph_clear_error_write()
519 spin_lock(&ci->i_ceph_lock); in ceph_clear_error_write()
520 ci->i_ceph_flags &= ~CEPH_I_ERROR_WRITE; in ceph_clear_error_write()
521 spin_unlock(&ci->i_ceph_lock); in ceph_clear_error_write()
525 static inline void __ceph_dir_set_complete(struct ceph_inode_info *ci, in __ceph_dir_set_complete() argument
530 atomic64_set(&ci->i_complete_seq[0], release_count); in __ceph_dir_set_complete()
531 atomic64_set(&ci->i_complete_seq[1], ordered_count); in __ceph_dir_set_complete()
534 static inline void __ceph_dir_clear_complete(struct ceph_inode_info *ci) in __ceph_dir_clear_complete() argument
536 atomic64_inc(&ci->i_release_count); in __ceph_dir_clear_complete()
539 static inline void __ceph_dir_clear_ordered(struct ceph_inode_info *ci) in __ceph_dir_clear_ordered() argument
541 atomic64_inc(&ci->i_ordered_count); in __ceph_dir_clear_ordered()
544 static inline bool __ceph_dir_is_complete(struct ceph_inode_info *ci) in __ceph_dir_is_complete() argument
546 return atomic64_read(&ci->i_complete_seq[0]) == in __ceph_dir_is_complete()
547 atomic64_read(&ci->i_release_count); in __ceph_dir_is_complete()
550 static inline bool __ceph_dir_is_complete_ordered(struct ceph_inode_info *ci) in __ceph_dir_is_complete_ordered() argument
552 return atomic64_read(&ci->i_complete_seq[0]) == in __ceph_dir_is_complete_ordered()
553 atomic64_read(&ci->i_release_count) && in __ceph_dir_is_complete_ordered()
554 atomic64_read(&ci->i_complete_seq[1]) == in __ceph_dir_is_complete_ordered()
555 atomic64_read(&ci->i_ordered_count); in __ceph_dir_is_complete_ordered()
576 extern struct ceph_inode_frag *__ceph_find_frag(struct ceph_inode_info *ci,
583 extern u32 ceph_choose_frag(struct ceph_inode_info *ci, u32 v,
595 static inline bool __ceph_is_any_real_caps(struct ceph_inode_info *ci) in __ceph_is_any_real_caps() argument
597 return !RB_EMPTY_ROOT(&ci->i_caps); in __ceph_is_any_real_caps()
600 extern int __ceph_caps_issued(struct ceph_inode_info *ci, int *implemented);
601 extern int __ceph_caps_issued_mask(struct ceph_inode_info *ci, int mask, int t);
602 extern int __ceph_caps_issued_other(struct ceph_inode_info *ci,
605 static inline int ceph_caps_issued(struct ceph_inode_info *ci) in ceph_caps_issued() argument
608 spin_lock(&ci->i_ceph_lock); in ceph_caps_issued()
609 issued = __ceph_caps_issued(ci, NULL); in ceph_caps_issued()
610 spin_unlock(&ci->i_ceph_lock); in ceph_caps_issued()
614 static inline int ceph_caps_issued_mask(struct ceph_inode_info *ci, int mask, in ceph_caps_issued_mask() argument
618 spin_lock(&ci->i_ceph_lock); in ceph_caps_issued_mask()
619 r = __ceph_caps_issued_mask(ci, mask, touch); in ceph_caps_issued_mask()
620 spin_unlock(&ci->i_ceph_lock); in ceph_caps_issued_mask()
624 static inline int __ceph_caps_dirty(struct ceph_inode_info *ci) in __ceph_caps_dirty() argument
626 return ci->i_dirty_caps | ci->i_flushing_caps; in __ceph_caps_dirty()
630 extern int __ceph_mark_dirty_caps(struct ceph_inode_info *ci, int mask,
633 extern int __ceph_caps_revoking_other(struct ceph_inode_info *ci,
635 extern int ceph_caps_revoking(struct ceph_inode_info *ci, int mask);
636 extern int __ceph_caps_used(struct ceph_inode_info *ci);
638 extern int __ceph_caps_file_wanted(struct ceph_inode_info *ci);
643 static inline int __ceph_caps_wanted(struct ceph_inode_info *ci) in __ceph_caps_wanted() argument
645 int w = __ceph_caps_file_wanted(ci) | __ceph_caps_used(ci); in __ceph_caps_wanted()
652 extern int __ceph_caps_mds_wanted(struct ceph_inode_info *ci, bool check);
832 extern void ceph_queue_cap_snap(struct ceph_inode_info *ci);
833 extern int __ceph_finish_cap_snap(struct ceph_inode_info *ci,
841 static inline bool __ceph_have_pending_cap_snap(struct ceph_inode_info *ci) in __ceph_have_pending_cap_snap() argument
843 return !list_empty(&ci->i_cap_snaps) && in __ceph_have_pending_cap_snap()
844 list_last_entry(&ci->i_cap_snaps, struct ceph_cap_snap, in __ceph_have_pending_cap_snap()
894 extern void __ceph_build_xattrs_blob(struct ceph_inode_info *ci);
895 extern void __ceph_destroy_xattrs(struct ceph_inode_info *ci);
987 extern struct ceph_cap *ceph_get_cap_for_mds(struct ceph_inode_info *ci,
990 extern void ceph_get_cap_refs(struct ceph_inode_info *ci, int caps);
991 extern void ceph_put_cap_refs(struct ceph_inode_info *ci, int had);
992 extern void ceph_put_wrbuffer_cap_refs(struct ceph_inode_info *ci, int nr,
994 extern void ceph_flush_snaps(struct ceph_inode_info *ci,
996 extern bool __ceph_should_report_size(struct ceph_inode_info *ci);
997 extern void ceph_check_caps(struct ceph_inode_info *ci, int flags,
1008 extern int ceph_get_caps(struct ceph_inode_info *ci, int need, int want,
1010 extern int ceph_try_get_caps(struct ceph_inode_info *ci,
1014 extern void __ceph_get_fmode(struct ceph_inode_info *ci, int mode);
1015 extern void ceph_put_fmode(struct ceph_inode_info *ci, int mode);
1021 extern int ceph_pool_perm_check(struct ceph_inode_info *ci, int need);
1080 static inline bool __ceph_has_any_quota(struct ceph_inode_info *ci) in __ceph_has_any_quota() argument
1082 return ci->i_max_files || ci->i_max_bytes; in __ceph_has_any_quota()
1087 static inline void __ceph_update_quota(struct ceph_inode_info *ci, in __ceph_update_quota() argument
1091 had_quota = __ceph_has_any_quota(ci); in __ceph_update_quota()
1092 ci->i_max_bytes = max_bytes; in __ceph_update_quota()
1093 ci->i_max_files = max_files; in __ceph_update_quota()
1094 has_quota = __ceph_has_any_quota(ci); in __ceph_update_quota()
1097 ceph_adjust_quota_realms_count(&ci->vfs_inode, has_quota); in __ceph_update_quota()