Lines Matching +full:support +full:- +full:nesting
1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc.
111 return ip->i_prev_unlinked != 0; in xfs_inode_on_unlinked_list()
116 return ip->i_forkoff > 0; in xfs_inode_has_attr_fork()
126 return &ip->i_df; in xfs_ifork_ptr()
130 return &ip->i_af; in xfs_ifork_ptr()
132 return ip->i_cowfp; in xfs_ifork_ptr()
141 return ip->i_forkoff << 3; in xfs_inode_fork_boff()
149 return XFS_LITINO(ip->i_mount); in xfs_inode_data_fork_size()
155 return XFS_LITINO(ip->i_mount) - xfs_inode_fork_boff(ip); in xfs_inode_attr_fork_size()
183 return &ip->i_vnode; in VFS_I()
189 return &ip->i_vnode; in VFS_IC()
193 * For regular files we only update the on-disk filesize when actually
199 if (S_ISREG(VFS_I(ip)->i_mode)) in XFS_ISIZE()
201 return ip->i_disk_size; in XFS_ISIZE()
205 * If this I/O goes past the on-disk inode size update it unless it would
206 * be past the current in-core inode size.
215 return new_size > ip->i_disk_size ? new_size : 0; in xfs_new_eof()
224 ip->i_flags |= flags; in __xfs_iflags_set()
230 spin_lock(&ip->i_flags_lock); in xfs_iflags_set()
232 spin_unlock(&ip->i_flags_lock); in xfs_iflags_set()
238 spin_lock(&ip->i_flags_lock); in xfs_iflags_clear()
239 ip->i_flags &= ~flags; in xfs_iflags_clear()
240 spin_unlock(&ip->i_flags_lock); in xfs_iflags_clear()
246 return (ip->i_flags & flags); in __xfs_iflags_test()
253 spin_lock(&ip->i_flags_lock); in xfs_iflags_test()
255 spin_unlock(&ip->i_flags_lock); in xfs_iflags_test()
264 spin_lock(&ip->i_flags_lock); in xfs_iflags_test_and_clear()
265 ret = ip->i_flags & flags; in xfs_iflags_test_and_clear()
267 ip->i_flags &= ~flags; in xfs_iflags_test_and_clear()
268 spin_unlock(&ip->i_flags_lock); in xfs_iflags_test_and_clear()
277 spin_lock(&ip->i_flags_lock); in xfs_iflags_test_and_set()
278 ret = ip->i_flags & flags; in xfs_iflags_test_and_set()
280 ip->i_flags |= flags; in xfs_iflags_test_and_set()
281 spin_unlock(&ip->i_flags_lock); in xfs_iflags_test_and_set()
287 return ip->i_diflags2 & XFS_DIFLAG2_REFLINK; in xfs_is_reflink_inode()
292 return ip->i_diflags2 & XFS_DIFLAG2_METADATA; in xfs_is_metadir_inode()
297 struct xfs_mount *mp = ip->i_mount; in xfs_is_internal_inode()
307 return ip->i_ino == mp->m_sb.sb_rbmino || in xfs_is_internal_inode()
308 ip->i_ino == mp->m_sb.sb_rsumino || in xfs_is_internal_inode()
309 xfs_is_quota_inode(&mp->m_sb, ip->i_ino); in xfs_is_internal_inode()
321 return ip->i_df.if_nextents > 0 || ip->i_delayed_blks > 0; in xfs_inode_has_filedata()
330 return ip->i_cowfp && ip->i_cowfp->if_bytes; in xfs_inode_has_cow_data()
335 return ip->i_diflags2 & XFS_DIFLAG2_BIGTIME; in xfs_inode_has_bigtime()
340 return ip->i_diflags2 & XFS_DIFLAG2_NREXT64; in xfs_inode_has_large_extent_counts()
349 return XFS_IS_REALTIME_INODE(ip) && ip->i_mount->m_sb.sb_rextsize > 1; in xfs_inode_has_bigrtalloc()
357 (ip)->i_mount->m_rtdev_targp : (ip)->i_mount->m_ddev_targp)
363 struct xfs_mount *mp = ip->i_mount; in xfs_inode_can_atomicwrite()
366 if (mp->m_sb.sb_blocksize < target->bt_bdev_awu_min) in xfs_inode_can_atomicwrite()
368 if (mp->m_sb.sb_blocksize > target->bt_bdev_awu_max) in xfs_inode_can_atomicwrite()
375 * In-core inode flags.
382 #define XFS_ITRUNCATED (1 << 5) /* truncated down so flush-on-close */
383 #define XFS_EOFBLOCKS_RELEASED (1 << 6) /* eofblocks were freed in ->release */
398 * If we need to update on-disk metadata before this IRECLAIMABLE inode can be
424 * Per-lifetime flags need to be reset when re-using a reclaimable inode during
435 * Bit ranges: 1<<1 - 1<<16-1 -- iolock/ilock modes (bitfield)
436 * 1<<16 - 1<<32-1 -- lockdep annotation (integers)
461 * XFS_LOCK_PARENT - for directory operations that require locking a
462 * parent directory inode and a child entry inode. IOLOCK requires nesting,
463 * MMAPLOCK does not support this class, ILOCK requires a single subclass
466 * XFS_LOCK_RTBITMAP/XFS_LOCK_RTSUM - the realtime device bitmap and summary
470 * XFS_LOCK_INUMORDER - for locking several inodes at the some time
474 * limited to the subclasses we can represent via nesting. We need at least
475 * 5 inodes nest depth for the ILOCK through rename, and we also have to support
479 * This also means we have to number the sub-classes in the lowest bits of
481 * mask and we can't use bit-masking to build the subclasses. What a mess.
486 * 16-19 XFS_IOLOCK_SHIFT dependencies
487 * 20-23 XFS_MMAPLOCK_SHIFT dependencies
488 * 24-31 XFS_ILOCK_SHIFT dependencies
492 * 0-3 subclass value
493 * 4-7 unused
497 * 0-3 subclass value
498 * 4-7 unused
501 * 0-4 subclass values
518 #define XFS_ILOCK_MAX_SUBCLASS (XFS_ILOCK_PARENT_VAL - 1)
535 * layout-holders do not collide with local writes. Additionally,
537 * layout-holder has a consistent view of the file's extent map. While
539 * BREAK_UNMAP breaks additionally require waiting for busy dax-pages to
548 * For multiple groups support: if S_ISGID bit is set in the parent
553 (xfs_has_grpid((pip)->i_mount) || (VFS_I(pip)->i_mode & S_ISGID))
587 #define xfs_ipincount(ip) ((unsigned int) atomic_read(&ip->i_pincount))
612 if (bdev_stable_writes(xfs_inode_buftarg(ip)->bt_bdev)) in xfs_update_stable_writes()
613 mapping_set_stable_writes(VFS_I(ip)->i_mapping); in xfs_update_stable_writes()
615 mapping_clear_stable_writes(VFS_I(ip)->i_mapping); in xfs_update_stable_writes()
664 return VFS_IC(ip)->i_nlink == 0 && !xfs_inode_on_unlinked_list(ip); in xfs_inode_unlinked_incomplete()