| /linux/fs/xfs/ |
| A D | xfs_inode.c | 224 up_read(&VFS_I(ip)->i_rwsem); in xfs_ilock_nowait() 251 up_read(&VFS_I(ip)->i_rwsem); in xfs_iunlock() 1283 if (VFS_I(ip)->i_mode == 0) in xfs_inode_needs_inactive() 2069 error = xfs_inode_init_security(VFS_I(tmpfile), VFS_I(dp), &name); in xfs_rename_alloc_whiteout() 2624 iput(VFS_I(ip)); in xfs_irele() 2756 ret = xfs_iolock_two_inodes_and_break_layout(VFS_I(ip1), VFS_I(ip2)); in xfs_ilock2_io_mmap() 2760 if (IS_DAX(VFS_I(ip1)) && IS_DAX(VFS_I(ip2))) { in xfs_ilock2_io_mmap() 2781 if (IS_DAX(VFS_I(ip1)) && IS_DAX(VFS_I(ip2))) { in xfs_iunlock2_io_mmap() 2789 inode_unlock(VFS_I(ip2)); in xfs_iunlock2_io_mmap() 2791 inode_unlock(VFS_I(ip1)); in xfs_iunlock2_io_mmap() [all …]
|
| A D | xfs_bmap_util.c | 513 if (!S_ISREG(VFS_I(ip)->i_mode)) in xfs_can_free_eofblocks() 520 if (VFS_I(ip)->i_size == 0 && in xfs_can_free_eofblocks() 577 inode_dio_wait(VFS_I(ip)); in xfs_free_eofblocks() 808 struct inode *inode = VFS_I(ip); in xfs_flush_unmap_range() 1138 (!uid_eq(VFS_I(ip)->i_uid, VFS_I(tip)->i_uid) || in xfs_swap_extents_check_format() 1139 !gid_eq(VFS_I(ip)->i_gid, VFS_I(tip)->i_gid) || in xfs_swap_extents_check_format() 1514 lock_two_nondirectories(VFS_I(ip), VFS_I(tip)); in xfs_swap_extents() 1516 VFS_I(tip)->i_mapping); in xfs_swap_extents() 1519 if ((VFS_I(ip)->i_mode & S_IFMT) != (VFS_I(tip)->i_mode & S_IFMT)) { in xfs_swap_extents() 1713 VFS_I(tip)->i_mapping); in xfs_swap_extents() [all …]
|
| A D | xfs_inode.h | 170 static inline struct inode *VFS_I(struct xfs_inode *ip) in VFS_I() function 188 if (S_ISREG(VFS_I(ip)->i_mode)) in XFS_ISIZE() 189 return i_size_read(VFS_I(ip)); in XFS_ISIZE() 200 xfs_fsize_t i_size = i_size_read(VFS_I(ip)); in xfs_new_eof() 519 (xfs_has_grpid((pip)->i_mount) || (VFS_I(pip)->i_mode & S_ISGID)) 579 mapping_set_stable_writes(VFS_I(ip)->i_mapping); in xfs_update_stable_writes() 581 mapping_clear_stable_writes(VFS_I(ip)->i_mapping); in xfs_update_stable_writes() 595 unlock_new_inode(VFS_I(ip)); in xfs_finish_inode_setup() 630 return VFS_I(ip)->i_nlink == 0 && !xfs_inode_on_unlinked_list(ip); in xfs_inode_unlinked_incomplete()
|
| 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_icache.c | 102 VFS_I(ip)->i_mode = 0; in xfs_inode_alloc() 141 switch (VFS_I(ip)->i_mode & S_IFMT) { in xfs_inode_free_callback() 379 struct inode *inode = VFS_I(ip); in xfs_iget_recycle() 453 if (VFS_I(ip)->i_mode != 0) { in xfs_iget_check_free_state() 456 ip->i_ino, VFS_I(ip)->i_mode); in xfs_iget_check_free_state() 476 if (VFS_I(ip)->i_mode == 0) in xfs_iget_check_free_state() 534 struct inode *inode = VFS_I(ip); in xfs_iget_cache_hit() 572 if (VFS_I(ip)->i_nlink == 0) { in xfs_iget_cache_hit() 734 d_mark_dontcache(VFS_I(ip)); in xfs_iget_cache_miss() 761 __destroy_inode(VFS_I(ip)); in xfs_iget_cache_miss() [all …]
|
| A D | xfs_health.c | 306 spin_lock(&VFS_I(ip)->i_lock); in xfs_inode_mark_sick() 307 VFS_I(ip)->i_state &= ~I_DONTCACHE; in xfs_inode_mark_sick() 308 spin_unlock(&VFS_I(ip)->i_lock); in xfs_inode_mark_sick() 330 spin_lock(&VFS_I(ip)->i_lock); in xfs_inode_mark_corrupt() 331 VFS_I(ip)->i_state &= ~I_DONTCACHE; in xfs_inode_mark_corrupt() 332 spin_unlock(&VFS_I(ip)->i_lock); in xfs_inode_mark_corrupt()
|
| A D | xfs_ioctl.c | 492 if (IS_DAX(VFS_I(ip)) && in xfs_ioctl_setattr_xflags() 524 if (rtflag != XFS_IS_REALTIME_INODE(ip) && S_ISREG(VFS_I(ip)->i_mode)) in xfs_ioctl_setattr_xflags() 539 struct inode *inode = VFS_I(ip); in xfs_ioctl_setattr_prepare_dax() 605 if (S_ISREG(VFS_I(ip)->i_mode) && xfs_inode_has_filedata(ip) && in xfs_ioctl_setattr_check_extsize() 631 VFS_I(ip)->i_mode, new_diflags); in xfs_ioctl_setattr_check_extsize() 656 VFS_I(ip)->i_mode, new_diflags, new_diflags2); in xfs_ioctl_setattr_check_cowextsize() 713 error = xfs_qm_vop_dqalloc(ip, VFS_I(ip)->i_uid, in xfs_fileattr_set() 714 VFS_I(ip)->i_gid, fa->fsx_projid, in xfs_fileattr_set() 750 if ((VFS_I(ip)->i_mode & (S_ISUID|S_ISGID)) && in xfs_fileattr_set() 751 !capable_wrt_inode_uidgid(idmap, VFS_I(ip), CAP_FSETID)) in xfs_fileattr_set() [all …]
|
| A D | xfs_iops.c | 229 inode = VFS_I(ip); in xfs_generic_create() 326 inode = VFS_I(cip); in xfs_vn_lookup() 364 return d_splice_alias(VFS_I(ip), dentry); in xfs_vn_ci_lookup() 369 dentry = d_add_ci(dentry, VFS_I(ip), &dname); in xfs_vn_ci_lookup() 447 inode = VFS_I(cip); in xfs_vn_symlink() 687 struct inode *inode = VFS_I(ip); in xfs_setattr_nonsize() 816 struct inode *inode = VFS_I(ip); in xfs_setattr_size() 912 error = filemap_write_and_wait_range(VFS_I(ip)->i_mapping, in xfs_setattr_size() 1220 if (!S_ISREG(VFS_I(ip)->i_mode)) in xfs_inode_supports_dax() 1253 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() 298 temp = i_size_read(VFS_I(ip2)); in xfs_exchrange_mappings() 299 i_size_write(VFS_I(ip2), i_size_read(VFS_I(ip1))); in xfs_exchrange_mappings() 300 i_size_write(VFS_I(ip1), temp); in xfs_exchrange_mappings() 551 size1 = i_size_read(VFS_I(ip1)); in xfs_exchrange_check_rtalign() 552 size2 = i_size_read(VFS_I(ip2)); in xfs_exchrange_check_rtalign()
|
| A D | xfs_symlink.c | 194 i_size_write(VFS_I(du.ip), du.ip->i_disk_size); in xfs_symlink() 291 VFS_I(ip)->i_mode = (VFS_I(ip)->i_mode & ~S_IFMT) | S_IFREG; in xfs_inactive_symlink_rmt()
|
| A D | xfs_pnfs.c | 97 VFS_I(ip)->i_mode &= ~S_ISUID; in xfs_fs_map_update_inode() 98 if (VFS_I(ip)->i_mode & S_IXGRP) in xfs_fs_map_update_inode() 99 VFS_I(ip)->i_mode &= ~S_ISGID; in xfs_fs_map_update_inode()
|
| /linux/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() 270 struct inode *dir = pip ? VFS_I(pip) : NULL; in xfs_inode_init() 272 struct inode *inode = VFS_I(ip); in xfs_inode_init() 536 ASSERT(VFS_I(ip)->i_nlink == 0); in xfs_iunlink() 537 ASSERT(VFS_I(ip)->i_mode != 0); in xfs_iunlink() 657 struct inode *inode = VFS_I(ip); in xfs_droplink() 686 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() 438 ASSERT(S_ISDIR(VFS_I(dp)->i_mode)); in xfs_dir_lookup() 504 ASSERT(S_ISDIR(VFS_I(dp)->i_mode)); in xfs_dir_removename() 561 ASSERT(S_ISDIR(VFS_I(dp)->i_mode)); in xfs_dir_replace() 869 if (S_ISDIR(VFS_I(ip)->i_mode)) { in xfs_dir_create_child() 921 if (VFS_I(ip)->i_nlink == 0) { in xfs_dir_add_child() 977 if (S_ISDIR(VFS_I(ip)->i_mode)) { in xfs_dir_remove_child() 978 ASSERT(VFS_I(ip)->i_nlink >= 2); in xfs_dir_remove_child() [all …]
|
| 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()
|
| /linux/fs/xfs/scrub/ |
| A D | parent.c | 145 expected_nlink = VFS_I(sc->ip)->i_nlink == 0 ? 0 : 1; in xchk_parent_validate() 165 !S_ISDIR(VFS_I(dp)->i_mode)) { in xchk_parent_validate() 313 if (VFS_I(sc->ip)->i_nlink == 0) in xchk_parent_pptr_and_dotdot() 423 if (!S_ISDIR(VFS_I(ip)->i_mode)) { in xchk_parent_iget() 713 if (S_ISDIR(VFS_I(sc->ip)->i_mode)) { in xchk_parent_count_pptrs() 717 if (VFS_I(sc->ip)->i_nlink == 0 && pp->pptrs_found > 0) in xchk_parent_count_pptrs() 719 else if (VFS_I(sc->ip)->i_nlink > 0 && in xchk_parent_count_pptrs() 723 if (VFS_I(sc->ip)->i_nlink != pp->pptrs_found) in xchk_parent_count_pptrs() 795 if (S_ISDIR(VFS_I(sc->ip)->i_mode)) { in xchk_parent_pptr() 838 if (!S_ISDIR(VFS_I(sc->ip)->i_mode)) in xchk_parent() [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() 332 if (S_ISDIR(VFS_I(sc->ip)->i_mode)) in xrep_adoption_trans_alloc() 407 xname->type = xfs_mode_to_ftype(VFS_I(sc->ip)->i_mode); in xrep_adoption_compute_name() 441 d_orphanage = d_find_alias(VFS_I(sc->orphanage)); in xrep_adoption_check_dcache() 478 d_orphanage = d_find_alias(VFS_I(sc->orphanage)); in xrep_adoption_zap_dcache() 495 while ((d_child = d_find_alias(VFS_I(sc->ip))) != NULL) { in xrep_adoption_zap_dcache() 527 bool isdir = S_ISDIR(VFS_I(sc->ip)->i_mode); in xrep_adoption_move()
|
| A D | tempfile.c | 107 VFS_I(sc->tempip)->i_flags |= S_PRIVATE; in xrep_tempfile_create() 108 VFS_I(sc->tempip)->i_opflags &= ~IOP_XATTR; in xrep_tempfile_create() 114 } else if (S_ISLNK(VFS_I(sc->tempip)->i_mode)) { in xrep_tempfile_create() 385 ASSERT(S_ISREG(VFS_I(sc->tempip)->i_mode)); in xrep_tempfile_copyin() 465 i_size_write(VFS_I(sc->tempip), isize); in xrep_tempfile_set_isize() 783 temp = i_size_read(VFS_I(sc->ip)); in xrep_tempexch_contents() 784 i_size_write(VFS_I(sc->ip), i_size_read(VFS_I(sc->tempip))); in xrep_tempexch_contents() 785 i_size_write(VFS_I(sc->tempip), temp); in xrep_tempexch_contents() 833 i_size_write(VFS_I(sc->ip), i_size_read(VFS_I(sc->tempip))); in xrep_tempfile_copyout_local()
|
| A D | findparent.c | 308 if (S_ISDIR(VFS_I(fpi.dp)->i_mode)) in xrep_findparent_scan() 369 if (sc->ip == sc->mp->m_rootip || VFS_I(sc->ip)->i_nlink == 0) { in xrep_findparent_confirm() 387 if (!S_ISDIR(VFS_I(fpi.dp)->i_mode)) { in xrep_findparent_confirm() 415 if (VFS_I(sc->ip)->i_nlink == 0) in xrep_findparent_self_reference() 430 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 | nlinks_repair.c | 168 actual_nlink = VFS_I(ip)->i_nlink; in xrep_nlinks_repair_inode() 180 if (!S_ISDIR(VFS_I(ip)->i_mode) && obs.children != 0) { in xrep_nlinks_repair_inode() 217 actual_nlink = VFS_I(ip)->i_nlink; in xrep_nlinks_repair_inode() 247 set_nlink(VFS_I(ip), min_t(unsigned long long, total_links, in xrep_nlinks_repair_inode()
|
| A D | bmap.c | 50 if (S_ISREG(VFS_I(sc->ip)->i_mode) && in xchk_setup_inode_bmap() 52 struct address_space *mapping = VFS_I(sc->ip)->i_mapping; in xchk_setup_inode_bmap() 59 error = xfs_break_layouts(VFS_I(sc->ip), in xchk_setup_inode_bmap() 65 inode_dio_wait(VFS_I(sc->ip)); in xchk_setup_inode_bmap() 89 VFS_I(sc->ip)->i_mapping); in xchk_setup_inode_bmap() 399 if (!S_ISDIR(VFS_I(ip)->i_mode) && info->whichfork != XFS_ATTR_FORK) in xchk_bmap_dirattr_extent() 693 if ((VFS_I(ip)->i_mode & 0777) != 0) in xchk_bmap_check_empty_attrfork() 695 if (!uid_eq(VFS_I(ip)->i_uid, GLOBAL_ROOT_UID)) in xchk_bmap_check_empty_attrfork() 697 if (!gid_eq(VFS_I(ip)->i_gid, GLOBAL_ROOT_GID)) in xchk_bmap_check_empty_attrfork() 732 return i_size_read(VFS_I(ip)) != 0; in xchk_bmap_check_empty_datafork()
|
| A D | common.c | 896 if (VFS_I(ip)->i_generation != sc->sm->sm_gen) { in xchk_install_handle_inode() 915 if (!igrab(VFS_I(ip))) { in xchk_install_live_inode() 1063 spin_lock(&VFS_I(ip)->i_lock); in xchk_irele() 1064 VFS_I(ip)->i_state &= ~I_DONTCACHE; in xchk_irele() 1065 spin_unlock(&VFS_I(ip)->i_lock); in xchk_irele() 1378 ASSERT(VFS_I(ip)->i_mode != 0); in xchk_inode_is_allocated() 1394 ASSERT(VFS_I(ip)->i_mode != 0); in xchk_inode_is_allocated() 1404 ASSERT(VFS_I(ip)->i_mode != 0); in xchk_inode_is_allocated() 1440 *inuse = VFS_I(ip)->i_mode != 0; in xchk_inode_is_allocated()
|
| 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() 781 if (S_ISDIR(VFS_I(sc->ip)->i_mode)) { in xrep_parent_move_to_orphanage() 836 if (S_ISDIR(VFS_I(sc->ip)->i_mode)) in xrep_parent_move_to_orphanage() 848 if (orig_parent == new_parent && VFS_I(sc->ip)->i_nlink > 0) { in xrep_parent_move_to_orphanage() 1371 if (S_ISDIR(VFS_I(rp->sc->ip)->i_mode)) in xrep_parent_rebuild_tree() 1457 if (VFS_I(ip)->i_nlink != rp->parents) { in xrep_parent_set_nondir_nlink() 1463 set_nlink(VFS_I(ip), min_t(unsigned long long, rp->parents, in xrep_parent_set_nondir_nlink() 1601 if (xfs_has_parent(sc->mp) && !S_ISDIR(VFS_I(sc->ip)->i_mode)) { in xrep_parent()
|
| A D | inode_repair.c | 415 if (S_ISDIR(VFS_I(dp)->i_mode)) in xrep_dinode_find_mode() 1540 if (!uid_valid(VFS_I(sc->ip)->i_uid)) { in xrep_inode_ids() 1541 i_uid_write(VFS_I(sc->ip), 0); in xrep_inode_ids() 1547 if (!gid_valid(VFS_I(sc->ip)->i_gid)) { in xrep_inode_ids() 1548 i_gid_write(VFS_I(sc->ip), 0); in xrep_inode_ids() 1572 *ts = timestamp_truncate(*ts, VFS_I(ip)); in xrep_clamp_timestamp() 1581 struct inode *inode = VFS_I(ip); in xrep_inode_timestamps() 1607 mode = VFS_I(sc->ip)->i_mode; in xrep_inode_flags() 1746 struct inode *inode = VFS_I(ip); in xrep_inode_pptr() 1797 if (S_ISDIR(VFS_I(sc->ip)->i_mode)) in xrep_inode_problems() [all …]
|
| A D | dir_repair.c | 418 xname.type = xfs_mode_to_ftype(VFS_I(ip)->i_mode); in xrep_dir_salvage_entry() 692 ASSERT(S_ISDIR(VFS_I(dp)->i_mode)); in xrep_dir_replay_createname() 716 ASSERT(S_ISDIR(VFS_I(dp)->i_mode)); in xrep_dir_replay_removename() 1099 .type = xfs_mode_to_ftype(VFS_I(ip)->i_mode), in xrep_dir_scan_pptr() 1119 parent_gen != VFS_I(sc->ip)->i_generation) in xrep_dir_scan_pptr() 1196 if (S_ISDIR(VFS_I(ip)->i_mode) && xfs_need_iread_extents(&ip->i_df)) { in xrep_dir_scan_ilock() 1239 if (S_ISDIR(VFS_I(ip)->i_mode)) { in xrep_dir_scan_file() 1518 ASSERT(S_ISDIR(VFS_I(dp)->i_mode)); in xrep_dir_replace() 1585 if (VFS_I(dp)->i_nlink != new_nlink) in xrep_dir_set_nlink() 1586 set_nlink(VFS_I(dp), new_nlink); in xrep_dir_set_nlink() [all …]
|