| /linux/fs/xfs/ |
| H A D | xfs_inode.c | 149 down_write_nested(&VFS_I(ip)->i_rwsem, in xfs_ilock() 152 down_read_nested(&VFS_I(ip)->i_rwsem, in xfs_ilock() 157 down_write_nested(&VFS_I(ip)->i_mapping->invalidate_lock, in xfs_ilock() 160 down_read_nested(&VFS_I(ip)->i_mapping->invalidate_lock, in xfs_ilock() 192 if (!down_write_trylock(&VFS_I(ip)->i_rwsem)) in xfs_ilock_nowait() 195 if (!down_read_trylock(&VFS_I(ip)->i_rwsem)) in xfs_ilock_nowait() 200 if (!down_write_trylock(&VFS_I(ip)->i_mapping->invalidate_lock)) in xfs_ilock_nowait() 203 if (!down_read_trylock(&VFS_I(ip)->i_mapping->invalidate_lock)) in xfs_ilock_nowait() 218 up_write(&VFS_I(ip)->i_mapping->invalidate_lock); in xfs_ilock_nowait() 220 up_read(&VFS_I(ip)->i_mapping->invalidate_lock); in xfs_ilock_nowait() [all …]
|
| H A D | xfs_bmap_util.c | 312 error = filemap_write_and_wait(VFS_I(ip)->i_mapping); in xfs_getbmap() 517 if (!(inode_state_read_once(VFS_I(ip)) & I_FREEING)) in xfs_can_free_eofblocks() 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() 529 VFS_I(ip)->i_mapping->nrpages == 0 && in xfs_can_free_eofblocks() 589 inode_dio_wait(VFS_I(ip)); in xfs_free_eofblocks() 850 struct inode *inode = VFS_I(ip); in xfs_flush_unmap_range() 941 error = filemap_write_and_wait_range(VFS_I(ip)->i_mapping, in xfs_free_file_space() 1182 (!uid_eq(VFS_I(ip)->i_uid, VFS_I(tip)->i_uid) || in xfs_swap_extents_check_format() 1183 !gid_eq(VFS_I(ip)->i_gid, VFS_I(tip)->i_gid) || in xfs_swap_extents_check_format() [all …]
|
| H A D | xfs_icache.c | 98 inode_init_always_gfp(mp->m_super, VFS_I(ip), gfp); in xfs_inode_alloc() 100 VFS_I(ip)->i_ino = ino; in xfs_inode_alloc() 102 VFS_I(ip)->i_mode = 0; in xfs_inode_alloc() 103 mapping_set_folio_min_order(VFS_I(ip)->i_mapping, in xfs_inode_alloc() 139 switch (VFS_I(ip)->i_mode & S_IFMT) { in xfs_inode_free_callback() 174 call_rcu(&VFS_I(ip)->i_rcu, xfs_inode_free_callback); in __xfs_inode_free() 191 VFS_I(ip)->i_ino = 0; in xfs_inode_free() 363 struct inode *inode = VFS_I(ip); in xfs_iget_recycle() 423 if (VFS_I(ip)->i_mode != 0) { in xfs_iget_check_free_state() 426 I_INO(ip), VFS_I(ip)->i_mode); in xfs_iget_check_free_state() [all …]
|
| H A D | xfs_inode.h | 175 static inline struct inode *VFS_I(struct xfs_inode *ip) in VFS_I() function 198 if (S_ISREG(VFS_I(ip)->i_mode)) in XFS_ISIZE() 199 return i_size_read(VFS_I(ip)); in XFS_ISIZE() 210 xfs_fsize_t i_size = i_size_read(VFS_I(ip)); in xfs_new_eof() 558 (xfs_has_grpid((pip)->i_mount) || (VFS_I(pip)->i_mode & S_ISGID)) 617 mapping_set_stable_writes(VFS_I(ip)->i_mapping); in xfs_update_stable_writes() 619 mapping_clear_stable_writes(VFS_I(ip)->i_mapping); in xfs_update_stable_writes() 633 unlock_new_inode(VFS_I(ip)); in xfs_finish_inode_setup()
|
| H A D | xfs_health.c | 330 fserror_report_file_metadata(VFS_I(ip), -EFSCORRUPTED, GFP_NOFS); in xfs_inode_report_fserror() 354 spin_lock(&VFS_I(ip)->i_lock); in xfs_inode_mark_sick() 355 inode_state_clear(VFS_I(ip), I_DONTCACHE); in xfs_inode_mark_sick() 356 spin_unlock(&VFS_I(ip)->i_lock); in xfs_inode_mark_sick() 386 spin_lock(&VFS_I(ip)->i_lock); in xfs_inode_mark_corrupt() 387 inode_state_clear(VFS_I(ip), I_DONTCACHE); in xfs_inode_mark_corrupt() 388 spin_unlock(&VFS_I(ip)->i_lock); in xfs_inode_mark_corrupt()
|
| H A D | xfs_ioctl.c | 570 if (IS_DAX(VFS_I(ip)) && in xfs_ioctl_setattr_xflags() 598 if (rtflag != XFS_IS_REALTIME_INODE(ip) && S_ISREG(VFS_I(ip)->i_mode)) in xfs_ioctl_setattr_xflags() 613 struct inode *inode = VFS_I(ip); in xfs_ioctl_setattr_prepare_dax() 679 if (S_ISREG(VFS_I(ip)->i_mode) && xfs_inode_has_filedata(ip) && in xfs_ioctl_setattr_check_extsize() 705 VFS_I(ip)->i_mode, new_diflags); in xfs_ioctl_setattr_check_extsize() 730 VFS_I(ip)->i_mode, new_diflags, new_diflags2); in xfs_ioctl_setattr_check_cowextsize() 798 error = xfs_qm_vop_dqalloc(ip, VFS_I(ip)->i_uid, in xfs_fileattr_set() 799 VFS_I(ip)->i_gid, fa->fsx_projid, in xfs_fileattr_set() 835 if ((VFS_I(ip)->i_mode & (S_ISUID|S_ISGID)) && in xfs_fileattr_set() 836 !capable_wrt_inode_uidgid(idmap, VFS_I(ip), CAP_FSETID)) in xfs_fileattr_set() [all …]
|
| H 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() 535 size1 = i_size_read(VFS_I(ip1)); in xfs_exchrange_check_rtalign() 536 size2 = i_size_read(VFS_I(ip2)); in xfs_exchrange_check_rtalign()
|
| H A D | xfs_iops.c | 232 inode = VFS_I(ip); in xfs_generic_create() 328 inode = VFS_I(cip); in xfs_vn_lookup() 366 return d_splice_alias(VFS_I(ip), dentry); in xfs_vn_ci_lookup() 371 dentry = d_add_ci(dentry, VFS_I(ip), &dname); in xfs_vn_ci_lookup() 447 inode = VFS_I(cip); in xfs_vn_symlink() 786 struct inode *inode = VFS_I(ip); in xfs_setattr_nonsize() 1038 error = filemap_write_and_wait_range(VFS_I(ip)->i_mapping, in xfs_vn_setattr_size() 1351 if (!S_ISREG(VFS_I(ip)->i_mode)) in xfs_inode_supports_dax() 1384 struct inode *inode = VFS_I(ip); in xfs_diflags_to_iflags()
|
| H A D | xfs_zone_alloc.c | 639 return VFS_I(ip)->i_write_hint; in xfs_inode_write_hint() 659 if (i_size_read(VFS_I(ip)) >= zone_capacity) in xfs_zoned_pack_tight() 662 return !inode_is_open_for_write(VFS_I(ip)) && in xfs_zoned_pack_tight() 797 oz = VFS_I(ip)->i_private; in xfs_get_cached_zone() 812 oz = VFS_I(ip)->i_private; in xfs_get_cached_zone() 814 VFS_I(ip)->i_private = NULL; in xfs_get_cached_zone() 863 old_oz = VFS_I(ip)->i_private; in xfs_set_cached_zone() 870 VFS_I(ip)->i_private = oz; in xfs_set_cached_zone()
|
| H A D | xfs_reflink.c | 1278 if (newlen <= i_size_read(VFS_I(dest)) && cowextsize == 0) in xfs_reflink_update_dest() 1288 if (newlen > i_size_read(VFS_I(dest))) { in xfs_reflink_update_dest() 1290 i_size_write(VFS_I(dest), newlen); in xfs_reflink_update_dest() 1540 if (newlen > i_size_read(VFS_I(ip))) { in xfs_reflink_remap_extent() 1542 i_size_write(VFS_I(ip), newlen); in xfs_reflink_remap_extent() 1649 loff_t isize = i_size_read(VFS_I(ip)); in xfs_reflink_zero_posteof() 1905 struct inode *inode = VFS_I(ip); in xfs_reflink_unshare()
|
| H A D | xfs_notify_failure.c | 107 mapping = VFS_I(ip)->i_mapping; in xfs_dax_failure_fn() 121 fserror_report_data_lost(VFS_I(ip), (u64)pgoff << PAGE_SHIFT, in xfs_dax_failure_fn()
|
| H A D | xfs_reflink.h | 18 struct inode *inode = VFS_I(ip); in xfs_can_free_cowblocks()
|
| /linux/fs/xfs/scrub/ |
| H 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() 236 clear_nlink(VFS_I(ip)); in xrep_nlinks_repair_inode() 240 set_nlink(VFS_I(ip), actual_nlink); in xrep_nlinks_repair_inode() 250 set_nlink(VFS_I(ip), min_t(unsigned long long, total_links, in xrep_nlinks_repair_inode()
|
| H 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() 215 if (!S_ISDIR(VFS_I(sc->tempip)->i_mode) && in xrep_tempfile_adjust_directory_tree() 216 !S_ISREG(VFS_I(sc->tempip)->i_mode)) in xrep_tempfile_adjust_directory_tree() 496 ASSERT(S_ISREG(VFS_I(sc->tempip)->i_mode)); in xrep_tempfile_copyin() 576 i_size_write(VFS_I(sc->tempip), isize); in xrep_tempfile_set_isize() 658 if (S_ISLNK(VFS_I(sc->ip)->i_mode) && whichfork == XFS_DATA_FORK) in xrep_tempexch_estimate_sf_resblks() 916 temp = i_size_read(VFS_I(sc->ip)); in xrep_tempexch_contents() 917 i_size_write(VFS_I(sc->ip), i_size_read(VFS_I(sc->tempip))); in xrep_tempexch_contents() [all …]
|
| H A D | parent.c | 152 expected_nlink = VFS_I(sc->ip)->i_nlink == 0 ? 0 : 1; in xchk_parent_validate() 172 !S_ISDIR(VFS_I(dp)->i_mode)) { in xchk_parent_validate() 326 if (VFS_I(sc->ip)->i_nlink == 0) in xchk_parent_pptr_and_dotdot() 436 if (!S_ISDIR(VFS_I(ip)->i_mode)) { in xchk_parent_iget() 442 if (VFS_I(ip)->i_generation != be32_to_cpu(pptr->p_gen)) { in xchk_parent_iget() 726 if (S_ISDIR(VFS_I(sc->ip)->i_mode)) { in xchk_parent_count_pptrs() 730 if (VFS_I(sc->ip)->i_nlink == 0 && pp->pptrs_found > 0) in xchk_parent_count_pptrs() 732 else if (VFS_I(sc->ip)->i_nlink > 0 && in xchk_parent_count_pptrs() 744 if (VFS_I(sc->ip)->i_nlink != pp->pptrs_found) in xchk_parent_count_pptrs() 811 if (S_ISDIR(VFS_I(sc->ip)->i_mode)) { in xchk_parent_pptr() [all …]
|
| H A D | findparent.c | 399 if (VFS_I(sc->ip)->i_nlink == 0) { in xrep_findparent_confirm() 417 if (!S_ISDIR(VFS_I(fpi.dp)->i_mode)) { in xrep_findparent_confirm() 448 if (VFS_I(sc->ip)->i_nlink == 0) in xrep_findparent_self_reference() 463 dentry = d_find_alias(VFS_I(sc->ip)); in xrep_findparent_from_dcache()
|
| H 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()
|
| H A D | dir_repair.c | 428 xname.type = xfs_mode_to_ftype(VFS_I(ip)->i_mode); in xrep_dir_salvage_entry() 708 ASSERT(S_ISDIR(VFS_I(dp)->i_mode)); in xrep_dir_replay_createname() 732 ASSERT(S_ISDIR(VFS_I(dp)->i_mode)); in xrep_dir_replay_removename() 1115 .type = xfs_mode_to_ftype(VFS_I(ip)->i_mode), in xrep_dir_scan_pptr() 1135 parent_gen != VFS_I(sc->ip)->i_generation) in xrep_dir_scan_pptr() 1212 if (S_ISDIR(VFS_I(ip)->i_mode) && xfs_need_iread_extents(&ip->i_df)) { in xrep_dir_scan_ilock() 1255 if (S_ISDIR(VFS_I(ip)->i_mode)) { in xrep_dir_scan_file() 1545 ASSERT(S_ISDIR(VFS_I(dp)->i_mode)); in xrep_dir_replace() 1612 if (VFS_I(dp)->i_nlink != new_nlink) in xrep_dir_set_nlink() 1613 set_nlink(VFS_I(dp), new_nlink); in xrep_dir_set_nlink() [all …]
|
| H A D | inode_repair.c | 418 if (S_ISDIR(VFS_I(dp)->i_mode)) in xrep_dinode_find_mode() 1729 if (!uid_valid(VFS_I(sc->ip)->i_uid)) { in xrep_inode_ids() 1730 i_uid_write(VFS_I(sc->ip), 0); in xrep_inode_ids() 1736 if (!gid_valid(VFS_I(sc->ip)->i_gid)) { in xrep_inode_ids() 1737 i_gid_write(VFS_I(sc->ip), 0); in xrep_inode_ids() 1752 VFS_I(sc->ip)->i_mode &= ~(S_ISUID | S_ISGID); in xrep_inode_ids() 1761 *ts = timestamp_truncate(*ts, VFS_I(ip)); in xrep_clamp_timestamp() 1770 struct inode *inode = VFS_I(ip); in xrep_inode_timestamps() 1796 mode = VFS_I(sc->ip)->i_mode; in xrep_inode_flags() 1931 struct inode *inode = VFS_I(ip); in xrep_inode_pptr() [all …]
|
| H A D | nlinks.c | 435 if (VFS_I(dp)->i_nlink == 0) in xchk_nlinks_collect_dir() 590 if (S_ISDIR(VFS_I(ip)->i_mode)) in xchk_nlinks_collect() 708 if (!xfs_has_ftype(sc->mp) && S_ISDIR(VFS_I(ip)->i_mode)) in xchk_nlinks_compare_inode() 712 actual_nlink = VFS_I(ip)->i_nlink; in xchk_nlinks_compare_inode() 734 if (S_ISDIR(VFS_I(ip)->i_mode) && actual_nlink > 0) { in xchk_nlinks_compare_inode()
|
| H A D | dirtree.c | 414 if (VFS_I(dp)->i_generation != be32_to_cpu(dl->pptr_rec.p_gen)) { in xchk_dirpath_step_up() 450 if (!S_ISDIR(VFS_I(dp)->i_mode)) { in xchk_dirpath_step_up() 458 if (VFS_I(dp)->i_nlink == 0) { in xchk_dirpath_step_up() 947 if (!S_ISDIR(VFS_I(sc->ip)->i_mode)) in xchk_dirtree() 1032 if (VFS_I(sc->ip)->i_nlink == 0) in xchk_dirtree_parentless()
|
| H A D | metapath.c | 121 mpath->xname.type = xfs_mode_to_ftype(VFS_I(ip)->i_mode); in xchk_setup_metapath_scan() 374 if (VFS_I(ip)->i_nlink == 0) { in xrep_metadir_add_child() 393 if (S_ISDIR(VFS_I(ip)->i_mode)) { in xrep_metadir_add_child() 436 if (S_ISDIR(VFS_I(sc->ip)->i_mode)) { in xrep_metapath_link()
|
| /linux/fs/xfs/libxfs/ |
| H 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() 76 ASSERT(VFS_I(ip)->i_nlink == 0); in xfs_metafile_clear_iflag()
|
| /linux/fs/ntfs/ |
| H A D | reparse.c | 379 VFS_I(ni)->i_mode &= ~0222; in ntfs_parse_reparse() 677 rp_inode = ntfs_attr_iget(VFS_I(ni), AT_REPARSE_POINT, AT_UNNAMED, 0); in update_reparse_data() 731 vi = ntfs_attr_iget(VFS_I(ni), AT_REPARSE_POINT, AT_UNNAMED, 0); in ntfs_delete_reparse_index() 747 iput(VFS_I(xrni)); in ntfs_delete_reparse_index() 753 iput(VFS_I(xrni)); in ntfs_delete_reparse_index() 828 iput(VFS_I(xrni)); in ntfs_set_ntfs_reparse_data()
|
| H A D | namei.c | 768 d_instantiate_new(dentry, VFS_I(ni)); in ntfs_create() 947 if (!S_ISDIR(VFS_I(ni)->i_mode)) in ntfs_delete() 948 drop_nlink(VFS_I(ni)); in ntfs_delete() 962 if (S_ISDIR(VFS_I(ni)->i_mode) && !le16_to_cpu(ni_mrec->link_count)) in ntfs_delete() 963 drop_nlink(VFS_I(ni)); in ntfs_delete() 1089 d_instantiate_new(dentry, VFS_I(ni)); in ntfs_mkdir() 1150 struct inode *vi = VFS_I(ni); in __ntfs_link() 1232 inc_nlink(VFS_I(ni)); in __ntfs_link() 1443 vi = VFS_I(ni); in ntfs_symlink() 1497 d_instantiate_new(dentry, VFS_I(ni)); in ntfs_mknod()
|