Lines Matching refs:ip

76 static inline struct inode *VFS_I(struct xfs_inode *ip)  in VFS_I()  argument
78 return &ip->i_vnode; in VFS_I()
86 static inline xfs_fsize_t XFS_ISIZE(struct xfs_inode *ip) in XFS_ISIZE() argument
88 if (S_ISREG(VFS_I(ip)->i_mode)) in XFS_ISIZE()
89 return i_size_read(VFS_I(ip)); in XFS_ISIZE()
90 return ip->i_d.di_size; in XFS_ISIZE()
98 xfs_new_eof(struct xfs_inode *ip, xfs_fsize_t new_size) in xfs_new_eof() argument
100 xfs_fsize_t i_size = i_size_read(VFS_I(ip)); in xfs_new_eof()
104 return new_size > ip->i_d.di_size ? new_size : 0; in xfs_new_eof()
111 __xfs_iflags_set(xfs_inode_t *ip, unsigned short flags) in __xfs_iflags_set() argument
113 ip->i_flags |= flags; in __xfs_iflags_set()
117 xfs_iflags_set(xfs_inode_t *ip, unsigned short flags) in xfs_iflags_set() argument
119 spin_lock(&ip->i_flags_lock); in xfs_iflags_set()
120 __xfs_iflags_set(ip, flags); in xfs_iflags_set()
121 spin_unlock(&ip->i_flags_lock); in xfs_iflags_set()
125 xfs_iflags_clear(xfs_inode_t *ip, unsigned short flags) in xfs_iflags_clear() argument
127 spin_lock(&ip->i_flags_lock); in xfs_iflags_clear()
128 ip->i_flags &= ~flags; in xfs_iflags_clear()
129 spin_unlock(&ip->i_flags_lock); in xfs_iflags_clear()
133 __xfs_iflags_test(xfs_inode_t *ip, unsigned short flags) in __xfs_iflags_test() argument
135 return (ip->i_flags & flags); in __xfs_iflags_test()
139 xfs_iflags_test(xfs_inode_t *ip, unsigned short flags) in xfs_iflags_test() argument
142 spin_lock(&ip->i_flags_lock); in xfs_iflags_test()
143 ret = __xfs_iflags_test(ip, flags); in xfs_iflags_test()
144 spin_unlock(&ip->i_flags_lock); in xfs_iflags_test()
149 xfs_iflags_test_and_clear(xfs_inode_t *ip, unsigned short flags) in xfs_iflags_test_and_clear() argument
153 spin_lock(&ip->i_flags_lock); in xfs_iflags_test_and_clear()
154 ret = ip->i_flags & flags; in xfs_iflags_test_and_clear()
156 ip->i_flags &= ~flags; in xfs_iflags_test_and_clear()
157 spin_unlock(&ip->i_flags_lock); in xfs_iflags_test_and_clear()
162 xfs_iflags_test_and_set(xfs_inode_t *ip, unsigned short flags) in xfs_iflags_test_and_set() argument
166 spin_lock(&ip->i_flags_lock); in xfs_iflags_test_and_set()
167 ret = ip->i_flags & flags; in xfs_iflags_test_and_set()
169 ip->i_flags |= flags; in xfs_iflags_test_and_set()
170 spin_unlock(&ip->i_flags_lock); in xfs_iflags_test_and_set()
183 static inline bool xfs_is_reflink_inode(struct xfs_inode *ip) in xfs_is_reflink_inode() argument
185 return ip->i_d.di_flags2 & XFS_DIFLAG2_REFLINK; in xfs_is_reflink_inode()
192 static inline bool xfs_inode_has_cow_data(struct xfs_inode *ip) in xfs_inode_has_cow_data() argument
194 return ip->i_cowfp && ip->i_cowfp->if_bytes; in xfs_inode_has_cow_data()
197 static inline bool xfs_inode_has_bigtime(struct xfs_inode *ip) in xfs_inode_has_bigtime() argument
199 return ip->i_d.di_flags2 & XFS_DIFLAG2_BIGTIME; in xfs_inode_has_bigtime()
205 #define xfs_inode_buftarg(ip) \ argument
206 (XFS_IS_REALTIME_INODE(ip) ? \
207 (ip)->i_mount->m_rtdev_targp : (ip)->i_mount->m_ddev_targp)
368 int xfs_release(struct xfs_inode *ip);
369 void xfs_inactive(struct xfs_inode *ip);
377 struct xfs_inode *ip);
399 int xfs_log_force_inode(struct xfs_inode *ip);
401 #define xfs_ipincount(ip) ((unsigned int) atomic_read(&ip->i_pincount)) argument
407 xfs_extlen_t xfs_get_extsz_hint(struct xfs_inode *ip);
408 xfs_extlen_t xfs_get_cowextsz_hint(struct xfs_inode *ip);
417 struct xfs_inode *ip, in xfs_itruncate_extents() argument
421 return xfs_itruncate_extents_flags(tpp, ip, whichfork, new_size, 0); in xfs_itruncate_extents()
432 int xfs_update_prealloc_flags(struct xfs_inode *ip,
438 extern void xfs_setup_inode(struct xfs_inode *ip);
439 extern void xfs_setup_iops(struct xfs_inode *ip);
440 extern void xfs_diflags_to_iflags(struct xfs_inode *ip, bool init);
449 static inline void xfs_finish_inode_setup(struct xfs_inode *ip) in xfs_finish_inode_setup() argument
451 xfs_iflags_clear(ip, XFS_INEW); in xfs_finish_inode_setup()
453 unlock_new_inode(VFS_I(ip)); in xfs_finish_inode_setup()
454 wake_up_bit(&ip->i_flags, __XFS_INEW_BIT); in xfs_finish_inode_setup()
457 static inline void xfs_setup_existing_inode(struct xfs_inode *ip) in xfs_setup_existing_inode() argument
459 xfs_setup_inode(ip); in xfs_setup_existing_inode()
460 xfs_setup_iops(ip); in xfs_setup_existing_inode()
461 xfs_finish_inode_setup(ip); in xfs_setup_existing_inode()
464 void xfs_irele(struct xfs_inode *ip);