Lines Matching refs:i_d

107 	if (vp->v_type == VDIR && ip->i_d.di_nextents > 0) {  in xfs_open()
109 if (ip->i_d.di_nextents > 0) in xfs_open()
143 vap->va_size = ip->i_d.di_size; in xfs_getattr()
148 XFS_FSB_TO_BB(mp, ip->i_d.di_nblocks + ip->i_delayed_blks); in xfs_getattr()
153 vap->va_nlink = ip->i_d.di_nlink; in xfs_getattr()
167 vap->va_mode = ip->i_d.di_mode & MODEMASK; in xfs_getattr()
168 vap->va_uid = ip->i_d.di_uid; in xfs_getattr()
169 vap->va_gid = ip->i_d.di_gid; in xfs_getattr()
170 vap->va_projid = ip->i_d.di_projid; in xfs_getattr()
180 if (!(ip->i_d.di_flags & XFS_DIFLAG_REALTIME)) { in xfs_getattr()
223 vap->va_blocksize = ip->i_d.di_extsize ? in xfs_getattr()
224 (ip->i_d.di_extsize << mp->m_sb.sb_blocklog) : in xfs_getattr()
232 vap->va_atime.tv_sec = ip->i_d.di_atime.t_sec; in xfs_getattr()
233 vap->va_atime.tv_nsec = ip->i_d.di_atime.t_nsec; in xfs_getattr()
234 vap->va_mtime.tv_sec = ip->i_d.di_mtime.t_sec; in xfs_getattr()
235 vap->va_mtime.tv_nsec = ip->i_d.di_mtime.t_nsec; in xfs_getattr()
236 vap->va_ctime.tv_sec = ip->i_d.di_ctime.t_sec; in xfs_getattr()
237 vap->va_ctime.tv_nsec = ip->i_d.di_ctime.t_nsec; in xfs_getattr()
251 vap->va_xflags = xfs_dic2xflags(&ip->i_d, ARCH_NOCONVERT); in xfs_getattr()
262 vap->va_extsize = ip->i_d.di_extsize << mp->m_sb.sb_blocklog; in xfs_getattr()
266 ip->i_d.di_nextents; in xfs_getattr()
271 ip->i_d.di_anextents; in xfs_getattr()
274 vap->va_gen = ip->i_d.di_gen; in xfs_getattr()
361 uid = ip->i_d.di_uid; in xfs_setattr()
367 gid = ip->i_d.di_gid; in xfs_setattr()
417 file_owner = (current_fsuid(credp) == ip->i_d.di_uid); in xfs_setattr()
456 !in_group_p((gid_t)ip->i_d.di_gid)) in xfs_setattr()
482 iuid = ip->i_d.di_uid; in xfs_setattr()
483 iprojid = ip->i_d.di_projid; in xfs_setattr()
484 igid = ip->i_d.di_gid; in xfs_setattr()
530 (ip->i_d.di_size == 0) && (ip->i_d.di_nextents == 0)) { in xfs_setattr()
573 if ((ip->i_d.di_nextents || ip->i_delayed_blks) && in xfs_setattr()
575 ((ip->i_d.di_extsize << mp->m_sb.sb_blocklog) != in xfs_setattr()
590 ((ip->i_d.di_extsize << mp->m_sb.sb_blocklog) != in xfs_setattr()
592 (!((ip->i_d.di_flags & XFS_DIFLAG_REALTIME) || in xfs_setattr()
602 if (ip->i_d.di_nextents && (mask & XFS_AT_XFLAGS) && in xfs_setattr()
603 (ip->i_d.di_flags & XFS_DIFLAG_REALTIME) != in xfs_setattr()
615 if ((ip->i_d.di_flags & XFS_DIFLAG_REALTIME) || in xfs_setattr()
635 (ip->i_d.di_extsize % mp->m_sb.sb_rextsize)) { in xfs_setattr()
646 (ip->i_d.di_flags & in xfs_setattr()
666 if (vap->va_size > ip->i_d.di_size) in xfs_setattr()
697 mandlock_before = MANDLOCK(vp, ip->i_d.di_mode); in xfs_setattr()
703 if (vap->va_size > ip->i_d.di_size) { in xfs_setattr()
706 } else if ((vap->va_size <= ip->i_d.di_size) || in xfs_setattr()
707 ((vap->va_size == 0) && ip->i_d.di_nextents)) { in xfs_setattr()
716 ((ip->i_d.di_nlink != 0 || in xfs_setattr()
733 ip->i_d.di_mode &= S_IFMT; in xfs_setattr()
734 ip->i_d.di_mode |= vap->va_mode & ~S_IFMT; in xfs_setattr()
754 if ((ip->i_d.di_mode & (S_ISUID|S_ISGID)) && in xfs_setattr()
756 ip->i_d.di_mode &= ~(S_ISUID|S_ISGID); in xfs_setattr()
770 ip->i_d.di_uid = uid; in xfs_setattr()
779 ip->i_d.di_gid = gid; in xfs_setattr()
782 ip->i_d.di_projid = projid; in xfs_setattr()
788 if (ip->i_d.di_version == XFS_DINODE_VERSION_1) in xfs_setattr()
802 ip->i_d.di_atime.t_sec = vap->va_atime.tv_sec; in xfs_setattr()
803 ip->i_d.di_atime.t_nsec = vap->va_atime.tv_nsec; in xfs_setattr()
808 ip->i_d.di_mtime.t_sec = vap->va_mtime.tv_sec; in xfs_setattr()
809 ip->i_d.di_mtime.t_nsec = vap->va_mtime.tv_nsec; in xfs_setattr()
825 ip->i_d.di_extsize = vap->va_extsize >> in xfs_setattr()
832 di_flags = (ip->i_d.di_flags & XFS_DIFLAG_PREALLOC); in xfs_setattr()
843 if ((ip->i_d.di_mode & S_IFMT) == S_IFDIR) { in xfs_setattr()
856 ip->i_d.di_flags = di_flags; in xfs_setattr()
868 ip->i_d.di_ctime.t_sec = vap->va_ctime.tv_sec; in xfs_setattr()
869 ip->i_d.di_ctime.t_nsec = vap->va_ctime.tv_nsec; in xfs_setattr()
906 mandlock_after = MANDLOCK(vp, ip->i_d.di_mode); in xfs_setattr()
1010 ASSERT((ip->i_d.di_mode & S_IFMT) == S_IFLNK); in xfs_readlink()
1031 pathlen = (int)ip->i_d.di_size; in xfs_readlink()
1220 end_fsb = XFS_B_TO_FSB(mp, ((xfs_ufsize_t)ip->i_d.di_size)); in xfs_inactive_free_eofblocks()
1256 ip->i_d.di_size); in xfs_inactive_free_eofblocks()
1276 ip->i_d.di_size, in xfs_inactive_free_eofblocks()
1321 ASSERT(ip->i_d.di_size > XFS_IFORK_DSIZE(ip)); in xfs_inactive_symlink_rmt()
1329 ASSERT(ip->i_d.di_nextents > 0 && ip->i_d.di_nextents <= 2); in xfs_inactive_symlink_rmt()
1344 size = (int)ip->i_d.di_size; in xfs_inactive_symlink_rmt()
1345 ip->i_d.di_size = 0; in xfs_inactive_symlink_rmt()
1458 ASSERT(ip->i_d.di_size <= XFS_IFORK_DSIZE(ip)); in xfs_inactive_symlink_local()
1503 ASSERT(ip->i_d.di_forkoff != 0); in xfs_inactive_attrs()
1532 ASSERT(ip->i_d.di_anextents == 0); in xfs_inactive_attrs()
1550 if ((vp->v_type != VREG) || (ip->i_d.di_mode == 0)) { in xfs_release()
1566 if (ip->i_d.di_nlink != 0) { in xfs_release()
1567 if ((((ip->i_d.di_mode & S_IFMT) == S_IFREG) && in xfs_release()
1568 ((ip->i_d.di_size > 0) || (VN_CACHED(vp) > 0)) && in xfs_release()
1570 (!(ip->i_d.di_flags & (XFS_DIFLAG_PREALLOC|XFS_DIFLAG_APPEND)))) { in xfs_release()
1575 ip->i_d.di_nblocks + ip->i_delayed_blks); in xfs_release()
1614 if (ip->i_d.di_mode == 0 || VN_BAD(vp)) { in xfs_inactive()
1626 truncate = ((ip->i_d.di_nlink == 0) && in xfs_inactive()
1627 ((ip->i_d.di_size != 0) || (ip->i_d.di_nextents > 0)) && in xfs_inactive()
1628 ((ip->i_d.di_mode & S_IFMT) == S_IFREG)); in xfs_inactive()
1632 if (ip->i_d.di_nlink == 0 && in xfs_inactive()
1643 if (ip->i_d.di_nlink != 0) { in xfs_inactive()
1644 if ((((ip->i_d.di_mode & S_IFMT) == S_IFREG) && in xfs_inactive()
1645 ((ip->i_d.di_size > 0) || (VN_CACHED(vp) > 0)) && in xfs_inactive()
1647 (!(ip->i_d.di_flags & (XFS_DIFLAG_PREALLOC|XFS_DIFLAG_APPEND)) || in xfs_inactive()
1653 ip->i_d.di_nblocks + ip->i_delayed_blks); in xfs_inactive()
1658 ASSERT(ip->i_d.di_nlink == 0); in xfs_inactive()
1707 } else if ((ip->i_d.di_mode & S_IFMT) == S_IFLNK) { in xfs_inactive()
1713 error = (ip->i_d.di_size > XFS_IFORK_DSIZE(ip)) ? in xfs_inactive()
1747 if (ip->i_d.di_anextents > 0) { in xfs_inactive()
2392 dm_di_mode = ip->i_d.di_mode; in xfs_remove()
2482 link_zero = (ip)->i_d.di_nlink==0; in xfs_remove()
2676 if (sip->i_d.di_nlink >= XFS_MAXLINK) { in xfs_link()
2839 if (dp->i_d.di_nlink >= XFS_MAXLINK) { in xfs_mkdir()
3042 dm_di_mode = cdp->i_d.di_mode; in xfs_rmdir()
3109 ASSERT(cdp->i_d.di_nlink >= 2); in xfs_rmdir()
3110 if (cdp->i_d.di_nlink != 2) { in xfs_rmdir()
3158 last_cdp_link = (cdp)->i_d.di_nlink==0; in xfs_rmdir()
3400 if (dp->i_d.di_flags & XFS_DIFLAG_NOSYMLINKS) { in xfs_symlink()
3453 ip->i_d.di_size = pathlen; in xfs_symlink()
3461 ip->i_d.di_format = XFS_DINODE_FMT_LOCAL; in xfs_symlink()
3478 ip->i_d.di_size = pathlen; in xfs_symlink()
3608 xfid->fid_gen = ip->i_d.di_gen; in xfs_fid2()
3789 ip->i_iocore.io_dmevmask = ip->i_d.di_dmevmask = evmask; in xfs_set_dmattrs()
3790 ip->i_iocore.io_dmstate = ip->i_d.di_dmstate = state; in xfs_set_dmattrs()
3823 if ((ip->i_d.di_mode & S_IFMT) == S_IFREG) { in xfs_reclaim()
3824 if (ip->i_d.di_size > 0) { in xfs_reclaim()
4066 if (ip->i_d.di_extsize) in xfs_alloc_file_space()
4067 rtextsize = ip->i_d.di_extsize; in xfs_alloc_file_space()
4088 if (alloc_type != 0 && offset < ip->i_d.di_size && in xfs_alloc_file_space()
4094 if (end_dmi_offset > ip->i_d.di_size) in xfs_alloc_file_space()
4095 end_dmi_offset = ip->i_d.di_size; in xfs_alloc_file_space()
4239 ip->i_d.di_flags & XFS_DIFLAG_REALTIME ? in xfs_zero_remaining_bytes()
4334 rt = (ip->i_d.di_flags & XFS_DIFLAG_REALTIME); in xfs_free_file_space()
4339 if (offset < ip->i_d.di_size && in xfs_free_file_space()
4342 if (end_dmi_offset > ip->i_d.di_size) in xfs_free_file_space()
4343 end_dmi_offset = ip->i_d.di_size; in xfs_free_file_space()
4549 bf->l_start += ip->i_d.di_size; in xfs_change_file_space()
4566 fsize = ip->i_d.di_size; in xfs_change_file_space()
4643 ip->i_d.di_mode &= ~S_ISUID; in xfs_change_file_space()
4652 if (ip->i_d.di_mode & S_IXGRP) in xfs_change_file_space()
4653 ip->i_d.di_mode &= ~S_ISGID; in xfs_change_file_space()
4658 ip->i_d.di_flags |= XFS_DIFLAG_PREALLOC; in xfs_change_file_space()
4660 ip->i_d.di_flags &= ~XFS_DIFLAG_PREALLOC; in xfs_change_file_space()