/fs/ramfs/ |
D | file-nommu.c | 62 int ramfs_nommu_expand_for_mapping(struct inode *inode, size_t newsize) in ramfs_nommu_expand_for_mapping() argument 72 order = get_order(newsize); in ramfs_nommu_expand_for_mapping() 76 ret = inode_newsize_ok(inode, newsize); in ramfs_nommu_expand_for_mapping() 80 i_size_write(inode, newsize); in ramfs_nommu_expand_for_mapping() 90 npages = (newsize + PAGE_SIZE - 1) >> PAGE_SHIFT; in ramfs_nommu_expand_for_mapping() 99 newsize = PAGE_SIZE * npages; in ramfs_nommu_expand_for_mapping() 101 memset(data, 0, newsize); in ramfs_nommu_expand_for_mapping() 132 static int ramfs_nommu_resize(struct inode *inode, loff_t newsize, loff_t size) in ramfs_nommu_resize() argument 139 if (unlikely(newsize >> 32)) in ramfs_nommu_resize() 142 return ramfs_nommu_expand_for_mapping(inode, newsize); in ramfs_nommu_resize() [all …]
|
/fs/xfs/ |
D | xfs_iops.c | 811 xfs_off_t oldsize, newsize; in xfs_setattr_size() local 824 newsize = iattr->ia_size; in xfs_setattr_size() 829 if (newsize == 0 && oldsize == 0 && ip->i_df.if_nextents == 0) { in xfs_setattr_size() 862 if (newsize > oldsize) { in xfs_setattr_size() 863 trace_xfs_zero_eof(ip, oldsize, newsize - oldsize); in xfs_setattr_size() 864 error = iomap_zero_range(inode, oldsize, newsize - oldsize, in xfs_setattr_size() 873 error = filemap_write_and_wait_range(inode->i_mapping, newsize, in xfs_setattr_size() 874 newsize); in xfs_setattr_size() 877 error = iomap_truncate_page(inode, newsize, &did_zeroing, in xfs_setattr_size() 905 truncate_setsize(inode, newsize); in xfs_setattr_size() [all …]
|
/fs/xfs/libxfs/ |
D | xfs_dir2_sf.c | 950 int newsize; /* new inode size */ in xfs_dir2_sf_removename() local 987 newsize = oldsize - entsize; in xfs_dir2_sf_removename() 998 dp->i_d.di_size = newsize; in xfs_dir2_sf_removename() 1002 xfs_idata_realloc(dp, newsize - oldsize, XFS_DATA_FORK); in xfs_dir2_sf_removename() 1026 int newsize; in xfs_dir2_sf_replace_needblock() local 1033 newsize = dp->i_df.if_bytes + (sfp->count + 1) * XFS_INO64_DIFF; in xfs_dir2_sf_replace_needblock() 1036 sfp->i8count == 0 && newsize > XFS_IFORK_DSIZE(dp); in xfs_dir2_sf_replace_needblock() 1166 int newsize; /* new inode size */ in xfs_dir2_sf_toino4() local 1188 newsize = oldsize - (oldsfp->count + 1) * XFS_INO64_DIFF; in xfs_dir2_sf_toino4() 1190 xfs_idata_realloc(dp, newsize, XFS_DATA_FORK); in xfs_dir2_sf_toino4() [all …]
|
D | xfs_attr.c | 541 int newsize, forkoff, retval; in xfs_attr_shortform_addname() local 566 newsize = xfs_attr_sf_totsize(args->dp); in xfs_attr_shortform_addname() 567 newsize += xfs_attr_sf_entsize_byname(args->namelen, args->valuelen); in xfs_attr_shortform_addname() 569 forkoff = xfs_attr_shortform_bytesfit(args->dp, newsize); in xfs_attr_shortform_addname()
|
/fs/ceph/ |
D | quota.c | 429 bool ceph_quota_is_max_bytes_exceeded(struct inode *inode, loff_t newsize) in ceph_quota_is_max_bytes_exceeded() argument 437 if (newsize <= size) in ceph_quota_is_max_bytes_exceeded() 440 return check_quota_exceeded(inode, QUOTA_CHECK_MAX_BYTES_OP, (newsize - size)); in ceph_quota_is_max_bytes_exceeded() 451 bool ceph_quota_is_max_bytes_approaching(struct inode *inode, loff_t newsize) in ceph_quota_is_max_bytes_approaching() argument 459 if (newsize <= size) in ceph_quota_is_max_bytes_approaching() 463 (newsize - size)); in ceph_quota_is_max_bytes_approaching()
|
/fs/gfs2/ |
D | bmap.c | 1372 static int gfs2_journaled_truncate(struct inode *inode, u64 oldsize, u64 newsize) in gfs2_journaled_truncate() argument 1379 while (oldsize != newsize) { in gfs2_journaled_truncate() 1383 chunk = oldsize - newsize; in gfs2_journaled_truncate() 1407 static int trunc_start(struct inode *inode, u64 newsize) in trunc_start() argument 1418 unsigned int offs = newsize & (blocksize - 1); in trunc_start() 1420 error = gfs2_block_zero_range(inode, newsize, in trunc_start() 1440 gfs2_buffer_clear_tail(dibh, sizeof(struct gfs2_dinode) + newsize); in trunc_start() 1444 i_size_write(inode, newsize); in trunc_start() 1449 error = gfs2_journaled_truncate(inode, oldsize, newsize); in trunc_start() 1451 truncate_pagecache(inode, newsize); in trunc_start() [all …]
|
/fs/jfs/ |
D | inode.c | 377 loff_t newsize; in jfs_truncate_nolock() local 398 newsize = xtTruncate(tid, ip, length, in jfs_truncate_nolock() 400 if (newsize < 0) { in jfs_truncate_nolock() 412 } while (newsize > length); /* Truncate isn't always atomic */ in jfs_truncate_nolock()
|
D | jfs_xtree.h | 105 extern s64 xtTruncate(tid_t tid, struct inode *ip, s64 newsize, int type);
|
D | jfs_dmap.c | 3428 s64 newsize; in dbExtendFS() local 3438 newsize = blkno + nblocks; in dbExtendFS() 3441 (long long) blkno, (long long) nblocks, (long long) newsize); in dbExtendFS() 3451 bmp->db_mapsize = newsize; in dbExtendFS() 3455 l2agsize = dbGetL2AGSize(newsize); in dbExtendFS() 3463 bmp->db_numag = newsize >> l2agsize; in dbExtendFS() 3464 bmp->db_numag += ((u32) newsize % (u32) bmp->db_agsize) ? 1 : 0; in dbExtendFS()
|
D | jfs_xtree.c | 3149 s64 xtTruncate(tid_t tid, struct inode *ip, s64 newsize, int flag) in xtTruncate() argument 3215 teof = (newsize + (JFS_SBI(ip->i_sb)->bsize - 1)) >> in xtTruncate() 3281 newsize = (xoff + xlen) << JFS_SBI(ip->i_sb)->l2bsize; in xtTruncate() 3664 if (S_ISDIR(ip->i_mode) && !newsize) in xtTruncate() 3667 ip->i_size = newsize; in xtTruncate() 3678 return newsize; in xtTruncate()
|
/fs/udf/ |
D | inode.c | 617 static int udf_extend_file(struct inode *inode, loff_t newsize) in udf_extend_file() argument 625 sector_t first_block = newsize >> sb->s_blocksize_bits, offset; in udf_extend_file() 667 (newsize & (sb->s_blocksize - 1)); in udf_extend_file() 682 iinfo->i_lenExtents = newsize; in udf_extend_file() 1219 int udf_setsize(struct inode *inode, loff_t newsize) in udf_setsize() argument 1232 if (newsize > inode->i_size) { in udf_setsize() 1236 (udf_file_entry_alloc_offset(inode) + newsize)) { in udf_setsize() 1242 iinfo->i_lenAlloc = newsize; in udf_setsize() 1246 err = udf_extend_file(inode, newsize); in udf_setsize() 1253 truncate_setsize(inode, newsize); in udf_setsize() [all …]
|
/fs/f2fs/ |
D | xattr.c | 633 int found, newsize; in __f2fs_setxattr() local 696 newsize = XATTR_ALIGN(sizeof(struct f2fs_xattr_entry) + len + size); in __f2fs_setxattr() 709 if (unlikely(free < newsize)) { in __f2fs_setxattr() 744 new_hsize += newsize; in __f2fs_setxattr() 750 *(u32 *)((u8 *)last + newsize) = 0; in __f2fs_setxattr()
|
/fs/affs/ |
D | file.c | 559 affs_extent_file_ofs(struct inode *inode, u32 newsize) in affs_extent_file_ofs() argument 567 pr_debug("%s(%lu, %d)\n", __func__, inode->i_ino, newsize); in affs_extent_file_ofs() 577 tmp = min(bsize - boff, newsize - size); in affs_extent_file_ofs() 591 while (size < newsize) { in affs_extent_file_ofs() 596 tmp = min(bsize, newsize - size); in affs_extent_file_ofs() 621 inode->i_size = AFFS_I(inode)->mmu_private = newsize; in affs_extent_file_ofs() 625 inode->i_size = AFFS_I(inode)->mmu_private = newsize; in affs_extent_file_ofs()
|
/fs/ext2/ |
D | inode.c | 1281 static int ext2_setsize(struct inode *inode, loff_t newsize) in ext2_setsize() argument 1296 error = iomap_zero_range(inode, newsize, in ext2_setsize() 1297 PAGE_ALIGN(newsize) - newsize, NULL, in ext2_setsize() 1301 newsize, ext2_get_block); in ext2_setsize() 1304 newsize, ext2_get_block); in ext2_setsize() 1309 truncate_setsize(inode, newsize); in ext2_setsize() 1310 __ext2_truncate_blocks(inode, newsize); in ext2_setsize()
|
/fs/nfs/ |
D | nfs4session.c | 39 static void nfs4_shrink_slot_table(struct nfs4_slot_table *tbl, u32 newsize) in nfs4_shrink_slot_table() argument 42 if (newsize >= tbl->max_slots) in nfs4_shrink_slot_table() 46 while (newsize--) in nfs4_shrink_slot_table()
|
/fs/nilfs2/ |
D | ioctl.c | 1034 __u64 newsize; in nilfs_ioctl_resize() local 1045 if (copy_from_user(&newsize, argp, sizeof(newsize))) in nilfs_ioctl_resize() 1048 ret = nilfs_resize_fs(inode->i_sb, newsize); in nilfs_ioctl_resize()
|
D | super.c | 420 int nilfs_resize_fs(struct super_block *sb, __u64 newsize) in nilfs_resize_fs() argument 430 if (newsize > devsize) in nilfs_resize_fs() 437 if (newsize < 4096) { in nilfs_resize_fs() 449 sb2off = NILFS_SB2_OFFSET_BYTES(newsize); in nilfs_resize_fs() 475 sbp[0]->s_dev_size = cpu_to_le64(newsize); in nilfs_resize_fs()
|
D | nilfs.h | 342 int nilfs_resize_fs(struct super_block *sb, __u64 newsize);
|
/fs/hugetlbfs/ |
D | inode.c | 788 loff_t newsize = attr->ia_size; in hugetlbfs_setattr() local 790 if (newsize & ~huge_page_mask(h)) in hugetlbfs_setattr() 793 if ((newsize < oldsize && (info->seals & F_SEAL_SHRINK)) || in hugetlbfs_setattr() 794 (newsize > oldsize && (info->seals & F_SEAL_GROW))) in hugetlbfs_setattr() 796 error = hugetlb_vmtruncate(inode, newsize); in hugetlbfs_setattr()
|
/fs/ext4/ |
D | ext4.h | 3295 static inline void ext4_update_i_disksize(struct inode *inode, loff_t newsize) in ext4_update_i_disksize() argument 3300 if (newsize > EXT4_I(inode)->i_disksize) in ext4_update_i_disksize() 3301 WRITE_ONCE(EXT4_I(inode)->i_disksize, newsize); in ext4_update_i_disksize() 3306 static inline int ext4_update_inode_size(struct inode *inode, loff_t newsize) in ext4_update_inode_size() argument 3310 if (newsize > inode->i_size) { in ext4_update_inode_size() 3311 i_size_write(inode, newsize); in ext4_update_inode_size() 3314 if (newsize > EXT4_I(inode)->i_disksize) { in ext4_update_inode_size() 3315 ext4_update_i_disksize(inode, newsize); in ext4_update_inode_size()
|
/fs/nfsd/ |
D | nfs3xdr.c | 121 u64 newsize; in decode_sattr3() local 124 p = xdr_decode_hyper(p, &newsize); in decode_sattr3() 125 iap->ia_size = min_t(u64, newsize, NFS_OFFSET_MAX); in decode_sattr3()
|
/fs/ocfs2/ |
D | namei.c | 1794 u64 newsize; in ocfs2_symlink() local 1941 newsize = l - 1; in ocfs2_symlink() 1961 (unsigned long long)newsize); in ocfs2_symlink() 1967 i_size_write(inode, newsize); in ocfs2_symlink() 1972 i_size_write(inode, newsize); in ocfs2_symlink()
|
D | aops.c | 1619 loff_t newsize = pos + len; in ocfs2_expand_nonsparse_inode() local 1623 if (newsize <= i_size_read(inode)) in ocfs2_expand_nonsparse_inode() 1626 ret = ocfs2_extend_no_holes(inode, di_bh, newsize, pos); in ocfs2_expand_nonsparse_inode()
|
/fs/btrfs/ |
D | inode.c | 4864 loff_t newsize = attr->ia_size; in btrfs_setsize() local 4874 if (newsize != oldsize) { in btrfs_setsize() 4881 if (newsize > oldsize) { in btrfs_setsize() 4890 ret = btrfs_cont_expand(inode, oldsize, newsize); in btrfs_setsize() 4902 i_size_write(inode, newsize); in btrfs_setsize() 4904 pagecache_isize_extended(inode, oldsize, newsize); in btrfs_setsize() 4915 if (newsize == 0) in btrfs_setsize() 4919 truncate_setsize(inode, newsize); in btrfs_setsize() 4923 ret = btrfs_truncate(inode, newsize == oldsize); in btrfs_setsize()
|