| /fs/xfs/ |
| A D | xfs_inode.c | 225 up_read(&VFS_I(ip)->i_rwsem); in xfs_ilock_nowait() 252 up_read(&VFS_I(ip)->i_rwsem); in xfs_iunlock() 1295 if (VFS_I(ip)->i_mode == 0) in xfs_inode_needs_inactive() 2082 error = xfs_inode_init_security(VFS_I(tmpfile), VFS_I(dp), &name); in xfs_rename_alloc_whiteout() 2654 iput(VFS_I(ip)); in xfs_irele() 2781 ret = xfs_iolock_two_inodes_and_break_layout(VFS_I(ip1), VFS_I(ip2)); in xfs_ilock2_io_mmap() 2785 if (IS_DAX(VFS_I(ip1)) && IS_DAX(VFS_I(ip2))) { in xfs_ilock2_io_mmap() 2806 if (IS_DAX(VFS_I(ip1)) && IS_DAX(VFS_I(ip2))) { in xfs_iunlock2_io_mmap() 2814 inode_unlock(VFS_I(ip2)); in xfs_iunlock2_io_mmap() 2816 inode_unlock(VFS_I(ip1)); in xfs_iunlock2_io_mmap() [all …]
|
| A D | xfs_bmap_util.c | 521 if (!S_ISREG(VFS_I(ip)->i_mode)) in xfs_can_free_eofblocks() 528 if (VFS_I(ip)->i_size == 0 && in xfs_can_free_eofblocks() 589 inode_dio_wait(VFS_I(ip)); in xfs_free_eofblocks() 820 struct inode *inode = VFS_I(ip); in xfs_flush_unmap_range() 1152 (!uid_eq(VFS_I(ip)->i_uid, VFS_I(tip)->i_uid) || in xfs_swap_extents_check_format() 1153 !gid_eq(VFS_I(ip)->i_gid, VFS_I(tip)->i_gid) || in xfs_swap_extents_check_format() 1528 lock_two_nondirectories(VFS_I(ip), VFS_I(tip)); in xfs_swap_extents() 1530 VFS_I(tip)->i_mapping); in xfs_swap_extents() 1533 if ((VFS_I(ip)->i_mode & S_IFMT) != (VFS_I(tip)->i_mode & S_IFMT)) { in xfs_swap_extents() 1739 VFS_I(tip)->i_mapping); in xfs_swap_extents() [all …]
|
| A D | xfs_icache.c | 105 VFS_I(ip)->i_mode = 0; in xfs_inode_alloc() 364 struct inode *inode = VFS_I(ip); in xfs_iget_recycle() 438 if (VFS_I(ip)->i_mode != 0) { in xfs_iget_check_free_state() 441 ip->i_ino, VFS_I(ip)->i_mode); in xfs_iget_check_free_state() 461 if (VFS_I(ip)->i_mode == 0) in xfs_iget_check_free_state() 519 struct inode *inode = VFS_I(ip); in xfs_iget_cache_hit() 557 if (VFS_I(ip)->i_nlink == 0) { in xfs_iget_cache_hit() 719 d_mark_dontcache(VFS_I(ip)); in xfs_iget_cache_miss() 746 __destroy_inode(VFS_I(ip)); in xfs_iget_cache_miss() 858 if (VFS_I(ip)->i_nlink == 0) in xfs_trans_metafile_iget() [all …]
|
| A D | xfs_inode.h | 176 static inline struct inode *VFS_I(struct xfs_inode *ip) in VFS_I() function 194 if (S_ISREG(VFS_I(ip)->i_mode)) in XFS_ISIZE() 195 return i_size_read(VFS_I(ip)); in XFS_ISIZE() 206 xfs_fsize_t i_size = i_size_read(VFS_I(ip)); in xfs_new_eof() 554 (xfs_has_grpid((pip)->i_mount) || (VFS_I(pip)->i_mode & S_ISGID)) 614 mapping_set_stable_writes(VFS_I(ip)->i_mapping); in xfs_update_stable_writes() 616 mapping_clear_stable_writes(VFS_I(ip)->i_mapping); in xfs_update_stable_writes() 630 unlock_new_inode(VFS_I(ip)); in xfs_finish_inode_setup()
|
| A D | xfs_export.c | 163 if (VFS_I(ip)->i_generation != generation || IS_PRIVATE(VFS_I(ip))) { in xfs_nfs_get_inode() 168 return VFS_I(ip); in xfs_nfs_get_inode() 230 return d_obtain_alias(VFS_I(cip)); in xfs_fs_get_parent()
|
| A D | xfs_health.c | 287 spin_lock(&VFS_I(ip)->i_lock); in xfs_inode_mark_sick() 288 VFS_I(ip)->i_state &= ~I_DONTCACHE; in xfs_inode_mark_sick() 289 spin_unlock(&VFS_I(ip)->i_lock); in xfs_inode_mark_sick() 311 spin_lock(&VFS_I(ip)->i_lock); in xfs_inode_mark_corrupt() 312 VFS_I(ip)->i_state &= ~I_DONTCACHE; in xfs_inode_mark_corrupt() 313 spin_unlock(&VFS_I(ip)->i_lock); in xfs_inode_mark_corrupt()
|
| A D | xfs_ioctl.c | 545 if (IS_DAX(VFS_I(ip)) && in xfs_ioctl_setattr_xflags() 573 if (rtflag != XFS_IS_REALTIME_INODE(ip) && S_ISREG(VFS_I(ip)->i_mode)) in xfs_ioctl_setattr_xflags() 588 struct inode *inode = VFS_I(ip); in xfs_ioctl_setattr_prepare_dax() 654 if (S_ISREG(VFS_I(ip)->i_mode) && xfs_inode_has_filedata(ip) && in xfs_ioctl_setattr_check_extsize() 680 VFS_I(ip)->i_mode, new_diflags); in xfs_ioctl_setattr_check_extsize() 705 VFS_I(ip)->i_mode, new_diflags, new_diflags2); in xfs_ioctl_setattr_check_cowextsize() 762 error = xfs_qm_vop_dqalloc(ip, VFS_I(ip)->i_uid, in xfs_fileattr_set() 763 VFS_I(ip)->i_gid, fa->fsx_projid, in xfs_fileattr_set() 799 if ((VFS_I(ip)->i_mode & (S_ISUID|S_ISGID)) && in xfs_fileattr_set() 800 !capable_wrt_inode_uidgid(idmap, VFS_I(ip), CAP_FSETID)) in xfs_fileattr_set() [all …]
|
| A D | xfs_iops.c | 232 inode = VFS_I(ip); in xfs_generic_create() 329 inode = VFS_I(cip); in xfs_vn_lookup() 367 return d_splice_alias(VFS_I(ip), dentry); in xfs_vn_ci_lookup() 372 dentry = d_add_ci(dentry, VFS_I(ip), &dname); in xfs_vn_ci_lookup() 450 inode = VFS_I(cip); in xfs_vn_symlink() 789 struct inode *inode = VFS_I(ip); in xfs_setattr_nonsize() 918 struct inode *inode = VFS_I(ip); in xfs_setattr_size() 1040 error = filemap_write_and_wait_range(VFS_I(ip)->i_mapping, in xfs_setattr_size() 1348 if (!S_ISREG(VFS_I(ip)->i_mode)) in xfs_inode_supports_dax() 1381 struct inode *inode = VFS_I(ip); in xfs_diflags_to_iflags()
|
| A D | xfs_exchrange.c | 87 struct inode *inode2 = VFS_I(ip2); in xfs_exchrange_check_freshness() 301 temp = i_size_read(VFS_I(ip2)); in xfs_exchrange_mappings() 302 i_size_write(VFS_I(ip2), i_size_read(VFS_I(ip1))); in xfs_exchrange_mappings() 303 i_size_write(VFS_I(ip1), temp); in xfs_exchrange_mappings() 532 size1 = i_size_read(VFS_I(ip1)); in xfs_exchrange_check_rtalign() 533 size2 = i_size_read(VFS_I(ip2)); in xfs_exchrange_check_rtalign()
|
| A D | xfs_pnfs.c | 94 VFS_I(ip)->i_mode &= ~S_ISUID; in xfs_fs_map_update_inode() 95 if (VFS_I(ip)->i_mode & S_IXGRP) in xfs_fs_map_update_inode() 96 VFS_I(ip)->i_mode &= ~S_ISGID; in xfs_fs_map_update_inode()
|
| /fs/xfs/libxfs/ |
| A D | xfs_inode_util.c | 50 if (S_ISDIR(VFS_I(ip)->i_mode)) { in xfs_flags2diflags() 59 } else if (S_ISREG(VFS_I(ip)->i_mode)) { in xfs_flags2diflags() 154 umode_t mode = VFS_I(ip)->i_mode; in xfs_inode_inherit_flags() 205 VFS_I(ip)->i_mode, ip->i_diflags); in xfs_inode_inherit_flags() 272 struct inode *dir = pip ? VFS_I(pip) : NULL; in xfs_inode_init() 274 struct inode *inode = VFS_I(ip); in xfs_inode_init() 539 ASSERT(VFS_I(ip)->i_nlink == 0); in xfs_iunlink() 540 ASSERT(VFS_I(ip)->i_mode != 0); in xfs_iunlink() 660 struct inode *inode = VFS_I(ip); in xfs_droplink() 689 struct inode *inode = VFS_I(ip); in xfs_bumplink() [all …]
|
| A D | xfs_dir2.c | 206 ASSERT(S_ISDIR(VFS_I(dp)->i_mode)); in xfs_dir_isempty() 246 ASSERT(S_ISDIR(VFS_I(dp)->i_mode)); in xfs_dir_init() 335 ASSERT(S_ISDIR(VFS_I(dp)->i_mode)); in xfs_dir_createname() 437 ASSERT(S_ISDIR(VFS_I(dp)->i_mode)); in xfs_dir_lookup() 503 ASSERT(S_ISDIR(VFS_I(dp)->i_mode)); in xfs_dir_removename() 560 ASSERT(S_ISDIR(VFS_I(dp)->i_mode)); in xfs_dir_replace() 868 if (S_ISDIR(VFS_I(ip)->i_mode)) { in xfs_dir_create_child() 920 if (VFS_I(ip)->i_nlink == 0) { in xfs_dir_add_child() 976 if (S_ISDIR(VFS_I(ip)->i_mode)) { in xfs_dir_remove_child() 977 ASSERT(VFS_I(ip)->i_nlink >= 2); in xfs_dir_remove_child() [all …]
|
| A D | xfs_metafile.c | 53 VFS_I(ip)->i_mode &= ~0777; in xfs_metafile_set_iflag() 54 VFS_I(ip)->i_uid = GLOBAL_ROOT_UID; in xfs_metafile_set_iflag() 55 VFS_I(ip)->i_gid = GLOBAL_ROOT_GID; in xfs_metafile_set_iflag() 56 if (S_ISDIR(VFS_I(ip)->i_mode)) in xfs_metafile_set_iflag() 73 ASSERT(VFS_I(ip)->i_nlink == 0); in xfs_metafile_clear_iflag()
|
| A D | xfs_trans_inode.c | 59 struct inode *inode = VFS_I(ip); in xfs_trans_ichgtime() 92 struct inode *inode = VFS_I(ip); in xfs_trans_log_inode()
|
| /fs/xfs/scrub/ |
| A D | parent.c | 153 expected_nlink = VFS_I(sc->ip)->i_nlink == 0 ? 0 : 1; in xchk_parent_validate() 173 !S_ISDIR(VFS_I(dp)->i_mode)) { in xchk_parent_validate() 327 if (VFS_I(sc->ip)->i_nlink == 0) in xchk_parent_pptr_and_dotdot() 437 if (!S_ISDIR(VFS_I(ip)->i_mode)) { in xchk_parent_iget() 727 if (S_ISDIR(VFS_I(sc->ip)->i_mode)) { in xchk_parent_count_pptrs() 731 if (VFS_I(sc->ip)->i_nlink == 0 && pp->pptrs_found > 0) in xchk_parent_count_pptrs() 733 else if (VFS_I(sc->ip)->i_nlink > 0 && in xchk_parent_count_pptrs() 745 if (VFS_I(sc->ip)->i_nlink != pp->pptrs_found) in xchk_parent_count_pptrs() 817 if (S_ISDIR(VFS_I(sc->ip)->i_mode)) { in xchk_parent_pptr() 860 if (!S_ISDIR(VFS_I(sc->ip)->i_mode)) in xchk_parent() [all …]
|
| A D | tempfile.c | 108 VFS_I(sc->tempip)->i_flags |= S_PRIVATE; in xrep_tempfile_create() 109 VFS_I(sc->tempip)->i_opflags &= ~IOP_XATTR; in xrep_tempfile_create() 115 } else if (S_ISLNK(VFS_I(sc->tempip)->i_mode)) { in xrep_tempfile_create() 214 if (!S_ISDIR(VFS_I(sc->tempip)->i_mode) && in xrep_tempfile_adjust_directory_tree() 215 !S_ISREG(VFS_I(sc->tempip)->i_mode)) in xrep_tempfile_adjust_directory_tree() 495 ASSERT(S_ISREG(VFS_I(sc->tempip)->i_mode)); in xrep_tempfile_copyin() 575 i_size_write(VFS_I(sc->tempip), isize); in xrep_tempfile_set_isize() 900 temp = i_size_read(VFS_I(sc->ip)); in xrep_tempexch_contents() 901 i_size_write(VFS_I(sc->ip), i_size_read(VFS_I(sc->tempip))); in xrep_tempexch_contents() 902 i_size_write(VFS_I(sc->tempip), temp); in xrep_tempexch_contents() [all …]
|
| A D | orphanage.c | 58 struct inode *inode = VFS_I(dp); in xrep_chown_orphanage() 127 struct inode *root_inode = VFS_I(sc->mp->m_rootip); in xrep_orphanage_create() 205 inode_unlock(VFS_I(sc->mp->m_rootip)); in xrep_orphanage_create() 334 if (S_ISDIR(VFS_I(sc->ip)->i_mode)) in xrep_adoption_trans_alloc() 409 xname->type = xfs_mode_to_ftype(VFS_I(sc->ip)->i_mode); in xrep_adoption_compute_name() 443 d_orphanage = d_find_alias(VFS_I(sc->orphanage)); in xrep_adoption_check_dcache() 480 d_orphanage = d_find_alias(VFS_I(sc->orphanage)); in xrep_adoption_zap_dcache() 497 while ((d_child = d_find_alias(VFS_I(sc->ip))) != NULL) { in xrep_adoption_zap_dcache() 529 bool isdir = S_ISDIR(VFS_I(sc->ip)->i_mode); in xrep_adoption_move()
|
| A D | nlinks_repair.c | 166 actual_nlink = VFS_I(ip)->i_nlink; in xrep_nlinks_repair_inode() 178 if (!S_ISDIR(VFS_I(ip)->i_mode) && obs.children != 0) { in xrep_nlinks_repair_inode() 215 actual_nlink = VFS_I(ip)->i_nlink; in xrep_nlinks_repair_inode() 245 set_nlink(VFS_I(ip), min_t(unsigned long long, total_links, in xrep_nlinks_repair_inode()
|
| A D | findparent.c | 312 if (S_ISDIR(VFS_I(fpi.dp)->i_mode)) in xrep_findparent_scan() 382 if (VFS_I(sc->ip)->i_nlink == 0) { in xrep_findparent_confirm() 400 if (!S_ISDIR(VFS_I(fpi.dp)->i_mode)) { in xrep_findparent_confirm() 431 if (VFS_I(sc->ip)->i_nlink == 0) in xrep_findparent_self_reference() 446 dentry = d_find_alias(VFS_I(sc->ip)); in xrep_findparent_from_dcache()
|
| A D | nlinks.h | 104 if (ip && S_ISDIR(VFS_I(ip)->i_mode) && VFS_I(ip)->i_nlink) in xchk_nlink_total()
|
| A D | bmap.c | 53 if (S_ISREG(VFS_I(sc->ip)->i_mode) && in xchk_setup_inode_bmap() 55 struct address_space *mapping = VFS_I(sc->ip)->i_mapping; in xchk_setup_inode_bmap() 62 error = xfs_break_layouts(VFS_I(sc->ip), in xchk_setup_inode_bmap() 68 inode_dio_wait(VFS_I(sc->ip)); in xchk_setup_inode_bmap() 92 VFS_I(sc->ip)->i_mapping); in xchk_setup_inode_bmap() 459 if (!S_ISDIR(VFS_I(ip)->i_mode) && info->whichfork != XFS_ATTR_FORK) in xchk_bmap_dirattr_extent() 776 if ((VFS_I(ip)->i_mode & 0777) != 0) in xchk_bmap_check_empty_attrfork() 778 if (!uid_eq(VFS_I(ip)->i_uid, GLOBAL_ROOT_UID)) in xchk_bmap_check_empty_attrfork() 780 if (!gid_eq(VFS_I(ip)->i_gid, GLOBAL_ROOT_GID)) in xchk_bmap_check_empty_attrfork() 811 return i_size_read(VFS_I(ip)) != 0; in xchk_bmap_check_empty_datafork()
|
| A D | parent_repair.c | 445 if (name->type != xfs_mode_to_ftype(VFS_I(sc->ip)->i_mode)) in xrep_parent_scan_dirent() 492 if (S_ISDIR(VFS_I(ip)->i_mode) && xfs_need_iread_extents(&ip->i_df)) { in xrep_parent_scan_ilock() 519 if (S_ISDIR(VFS_I(ip)->i_mode)) { in xrep_parent_scan_file() 777 if (S_ISDIR(VFS_I(sc->ip)->i_mode)) { in xrep_parent_move_to_orphanage() 832 if (S_ISDIR(VFS_I(sc->ip)->i_mode)) in xrep_parent_move_to_orphanage() 844 if (orig_parent == new_parent && VFS_I(sc->ip)->i_nlink > 0) { in xrep_parent_move_to_orphanage() 1384 if (S_ISDIR(VFS_I(sc->ip)->i_mode)) in xrep_parent_rebuild_tree() 1478 if (VFS_I(ip)->i_nlink != rp->parents) { in xrep_parent_set_nondir_nlink() 1484 set_nlink(VFS_I(ip), min_t(unsigned long long, rp->parents, in xrep_parent_set_nondir_nlink() 1622 if (xfs_has_parent(sc->mp) && !S_ISDIR(VFS_I(sc->ip)->i_mode)) { in xrep_parent()
|
| A D | common.c | 1078 if (VFS_I(ip)->i_generation != sc->sm->sm_gen) { in xchk_install_handle_inode() 1097 if (!igrab(VFS_I(ip))) { in xchk_install_live_inode() 1251 spin_lock(&VFS_I(ip)->i_lock); in xchk_irele() 1252 VFS_I(ip)->i_state &= ~I_DONTCACHE; in xchk_irele() 1253 spin_unlock(&VFS_I(ip)->i_lock); in xchk_irele() 1579 ASSERT(VFS_I(ip)->i_mode != 0); in xchk_inode_is_allocated() 1595 ASSERT(VFS_I(ip)->i_mode != 0); in xchk_inode_is_allocated() 1605 ASSERT(VFS_I(ip)->i_mode != 0); in xchk_inode_is_allocated() 1641 *inuse = VFS_I(ip)->i_mode != 0; in xchk_inode_is_allocated()
|
| A D | dir_repair.c | 424 xname.type = xfs_mode_to_ftype(VFS_I(ip)->i_mode); in xrep_dir_salvage_entry() 698 ASSERT(S_ISDIR(VFS_I(dp)->i_mode)); in xrep_dir_replay_createname() 722 ASSERT(S_ISDIR(VFS_I(dp)->i_mode)); in xrep_dir_replay_removename() 1105 .type = xfs_mode_to_ftype(VFS_I(ip)->i_mode), in xrep_dir_scan_pptr() 1125 parent_gen != VFS_I(sc->ip)->i_generation) in xrep_dir_scan_pptr() 1202 if (S_ISDIR(VFS_I(ip)->i_mode) && xfs_need_iread_extents(&ip->i_df)) { in xrep_dir_scan_ilock() 1245 if (S_ISDIR(VFS_I(ip)->i_mode)) { in xrep_dir_scan_file() 1520 ASSERT(S_ISDIR(VFS_I(dp)->i_mode)); in xrep_dir_replace() 1587 if (VFS_I(dp)->i_nlink != new_nlink) in xrep_dir_set_nlink() 1588 set_nlink(VFS_I(dp), new_nlink); in xrep_dir_set_nlink() [all …]
|
| A D | inode_repair.c | 418 if (S_ISDIR(VFS_I(dp)->i_mode)) in xrep_dinode_find_mode() 1725 if (!uid_valid(VFS_I(sc->ip)->i_uid)) { in xrep_inode_ids() 1726 i_uid_write(VFS_I(sc->ip), 0); in xrep_inode_ids() 1732 if (!gid_valid(VFS_I(sc->ip)->i_gid)) { in xrep_inode_ids() 1733 i_gid_write(VFS_I(sc->ip), 0); in xrep_inode_ids() 1757 *ts = timestamp_truncate(*ts, VFS_I(ip)); in xrep_clamp_timestamp() 1766 struct inode *inode = VFS_I(ip); in xrep_inode_timestamps() 1792 mode = VFS_I(sc->ip)->i_mode; in xrep_inode_flags() 1927 struct inode *inode = VFS_I(ip); in xrep_inode_pptr() 1985 if (S_ISDIR(VFS_I(sc->ip)->i_mode)) in xrep_inode_problems() [all …]
|