Lines Matching refs:ci
120 struct ceph_inode_info *ci; member
146 struct ceph_inode_info *ci; member
425 struct ceph_inode_info *ci = ceph_inode(inode); in ceph_ino_compare() local
426 return ci->i_vino.ino == pvino->ino && in ceph_ino_compare()
427 ci->i_vino.snap == pvino->snap; in ceph_ino_compare()
446 static inline void __ceph_dir_set_complete(struct ceph_inode_info *ci, in __ceph_dir_set_complete() argument
449 atomic_set(&ci->i_complete_count, release_count); in __ceph_dir_set_complete()
450 if (ci->i_ordered_count == ordered_count) in __ceph_dir_set_complete()
451 ci->i_ceph_flags |= CEPH_I_DIR_ORDERED; in __ceph_dir_set_complete()
453 ci->i_ceph_flags &= ~CEPH_I_DIR_ORDERED; in __ceph_dir_set_complete()
456 static inline void __ceph_dir_clear_complete(struct ceph_inode_info *ci) in __ceph_dir_clear_complete() argument
458 atomic_inc(&ci->i_release_count); in __ceph_dir_clear_complete()
461 static inline bool __ceph_dir_is_complete(struct ceph_inode_info *ci) in __ceph_dir_is_complete() argument
463 return atomic_read(&ci->i_complete_count) == in __ceph_dir_is_complete()
464 atomic_read(&ci->i_release_count); in __ceph_dir_is_complete()
467 static inline bool __ceph_dir_is_complete_ordered(struct ceph_inode_info *ci) in __ceph_dir_is_complete_ordered() argument
469 return __ceph_dir_is_complete(ci) && in __ceph_dir_is_complete_ordered()
470 (ci->i_ceph_flags & CEPH_I_DIR_ORDERED); in __ceph_dir_is_complete_ordered()
480 struct ceph_inode_info *ci = ceph_inode(inode); in ceph_dir_clear_ordered() local
481 spin_lock(&ci->i_ceph_lock); in ceph_dir_clear_ordered()
482 ci->i_ordered_count++; in ceph_dir_clear_ordered()
483 ci->i_ceph_flags &= ~CEPH_I_DIR_ORDERED; in ceph_dir_clear_ordered()
484 spin_unlock(&ci->i_ceph_lock); in ceph_dir_clear_ordered()
489 struct ceph_inode_info *ci = ceph_inode(inode); in ceph_dir_is_complete_ordered() local
491 spin_lock(&ci->i_ceph_lock); in ceph_dir_is_complete_ordered()
492 ret = __ceph_dir_is_complete_ordered(ci); in ceph_dir_is_complete_ordered()
493 spin_unlock(&ci->i_ceph_lock); in ceph_dir_is_complete_ordered()
498 extern struct ceph_inode_frag *__ceph_find_frag(struct ceph_inode_info *ci,
505 extern u32 ceph_choose_frag(struct ceph_inode_info *ci, u32 v,
522 static inline bool __ceph_is_any_real_caps(struct ceph_inode_info *ci) in __ceph_is_any_real_caps() argument
524 return !RB_EMPTY_ROOT(&ci->i_caps); in __ceph_is_any_real_caps()
527 extern int __ceph_caps_issued(struct ceph_inode_info *ci, int *implemented);
528 extern int __ceph_caps_issued_mask(struct ceph_inode_info *ci, int mask, int t);
529 extern int __ceph_caps_issued_other(struct ceph_inode_info *ci,
532 static inline int ceph_caps_issued(struct ceph_inode_info *ci) in ceph_caps_issued() argument
535 spin_lock(&ci->i_ceph_lock); in ceph_caps_issued()
536 issued = __ceph_caps_issued(ci, NULL); in ceph_caps_issued()
537 spin_unlock(&ci->i_ceph_lock); in ceph_caps_issued()
541 static inline int ceph_caps_issued_mask(struct ceph_inode_info *ci, int mask, in ceph_caps_issued_mask() argument
545 spin_lock(&ci->i_ceph_lock); in ceph_caps_issued_mask()
546 r = __ceph_caps_issued_mask(ci, mask, touch); in ceph_caps_issued_mask()
547 spin_unlock(&ci->i_ceph_lock); in ceph_caps_issued_mask()
551 static inline int __ceph_caps_dirty(struct ceph_inode_info *ci) in __ceph_caps_dirty() argument
553 return ci->i_dirty_caps | ci->i_flushing_caps; in __ceph_caps_dirty()
555 extern int __ceph_mark_dirty_caps(struct ceph_inode_info *ci, int mask);
557 extern int __ceph_caps_revoking_other(struct ceph_inode_info *ci,
559 extern int ceph_caps_revoking(struct ceph_inode_info *ci, int mask);
560 extern int __ceph_caps_used(struct ceph_inode_info *ci);
562 extern int __ceph_caps_file_wanted(struct ceph_inode_info *ci);
567 static inline int __ceph_caps_wanted(struct ceph_inode_info *ci) in __ceph_caps_wanted() argument
569 int w = __ceph_caps_file_wanted(ci) | __ceph_caps_used(ci); in __ceph_caps_wanted()
576 extern int __ceph_caps_mds_wanted(struct ceph_inode_info *ci);
702 extern void ceph_queue_cap_snap(struct ceph_inode_info *ci);
703 extern int __ceph_finish_cap_snap(struct ceph_inode_info *ci,
713 static inline bool __ceph_have_pending_cap_snap(struct ceph_inode_info *ci) in __ceph_have_pending_cap_snap() argument
715 return !list_empty(&ci->i_cap_snaps) && in __ceph_have_pending_cap_snap()
716 list_entry(ci->i_cap_snaps.prev, struct ceph_cap_snap, in __ceph_have_pending_cap_snap()
770 extern void __ceph_build_xattrs_blob(struct ceph_inode_info *ci);
771 extern void __ceph_destroy_xattrs(struct ceph_inode_info *ci);
849 extern struct ceph_cap *ceph_get_cap_for_mds(struct ceph_inode_info *ci,
852 extern void ceph_get_cap_refs(struct ceph_inode_info *ci, int caps);
853 extern void ceph_put_cap_refs(struct ceph_inode_info *ci, int had);
854 extern void ceph_put_wrbuffer_cap_refs(struct ceph_inode_info *ci, int nr,
856 extern void __ceph_flush_snaps(struct ceph_inode_info *ci,
859 extern void ceph_check_caps(struct ceph_inode_info *ci, int flags,
869 extern int ceph_get_caps(struct ceph_inode_info *ci, int need, int want,
873 static inline void __ceph_get_fmode(struct ceph_inode_info *ci, int mode) in __ceph_get_fmode() argument
875 ci->i_nr_by_mode[mode]++; in __ceph_get_fmode()
877 extern void ceph_put_fmode(struct ceph_inode_info *ci, int mode);