/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 | 793 xfs_off_t oldsize, newsize; in xfs_setattr_size() local 806 newsize = iattr->ia_size; in xfs_setattr_size() 811 if (newsize == 0 && oldsize == 0 && ip->i_df.if_nextents == 0) { in xfs_setattr_size() 844 if (newsize > oldsize) { in xfs_setattr_size() 845 trace_xfs_zero_eof(ip, oldsize, newsize - oldsize); in xfs_setattr_size() 846 error = xfs_zero_range(ip, oldsize, newsize - oldsize, in xfs_setattr_size() 855 error = filemap_write_and_wait_range(inode->i_mapping, newsize, in xfs_setattr_size() 856 newsize); in xfs_setattr_size() 859 error = xfs_truncate_page(ip, newsize, &did_zeroing); in xfs_setattr_size() 886 truncate_setsize(inode, newsize); in xfs_setattr_size() [all …]
|
/fs/xfs/libxfs/ |
D | xfs_dir2_sf.c | 946 int newsize; /* new inode size */ in xfs_dir2_sf_removename() local 983 newsize = oldsize - entsize; in xfs_dir2_sf_removename() 994 dp->i_disk_size = newsize; in xfs_dir2_sf_removename() 998 xfs_idata_realloc(dp, newsize - oldsize, XFS_DATA_FORK); in xfs_dir2_sf_removename() 1022 int newsize; in xfs_dir2_sf_replace_needblock() local 1029 newsize = dp->i_df.if_bytes + (sfp->count + 1) * XFS_INO64_DIFF; in xfs_dir2_sf_replace_needblock() 1032 sfp->i8count == 0 && newsize > xfs_inode_data_fork_size(dp); in xfs_dir2_sf_replace_needblock() 1162 int newsize; /* new inode size */ in xfs_dir2_sf_toino4() local 1184 newsize = oldsize - (oldsfp->count + 1) * XFS_INO64_DIFF; in xfs_dir2_sf_toino4() 1186 xfs_idata_realloc(dp, newsize, XFS_DATA_FORK); in xfs_dir2_sf_toino4() [all …]
|
D | xfs_attr.c | 1114 int newsize, forkoff; in xfs_attr_shortform_addname() local 1151 newsize = xfs_attr_sf_totsize(args->dp); in xfs_attr_shortform_addname() 1152 newsize += xfs_attr_sf_entsize_byname(args->namelen, args->valuelen); in xfs_attr_shortform_addname() 1154 forkoff = xfs_attr_shortform_bytesfit(args->dp, newsize); in xfs_attr_shortform_addname()
|
/fs/ceph/ |
D | quota.c | 436 bool ceph_quota_is_max_bytes_exceeded(struct inode *inode, loff_t newsize) in ceph_quota_is_max_bytes_exceeded() argument 444 if (newsize <= size) in ceph_quota_is_max_bytes_exceeded() 447 return check_quota_exceeded(inode, QUOTA_CHECK_MAX_BYTES_OP, (newsize - size)); in ceph_quota_is_max_bytes_exceeded() 458 bool ceph_quota_is_max_bytes_approaching(struct inode *inode, loff_t newsize) in ceph_quota_is_max_bytes_approaching() argument 466 if (newsize <= size) in ceph_quota_is_max_bytes_approaching() 470 (newsize - size)); in ceph_quota_is_max_bytes_approaching()
|
/fs/gfs2/ |
D | bmap.c | 1316 static int gfs2_journaled_truncate(struct inode *inode, u64 oldsize, u64 newsize) in gfs2_journaled_truncate() argument 1323 while (oldsize != newsize) { in gfs2_journaled_truncate() 1327 chunk = oldsize - newsize; in gfs2_journaled_truncate() 1351 static int trunc_start(struct inode *inode, u64 newsize) in trunc_start() argument 1362 unsigned int offs = newsize & (blocksize - 1); in trunc_start() 1364 error = gfs2_block_zero_range(inode, newsize, in trunc_start() 1384 gfs2_buffer_clear_tail(dibh, sizeof(struct gfs2_dinode) + newsize); in trunc_start() 1388 i_size_write(inode, newsize); in trunc_start() 1393 error = gfs2_journaled_truncate(inode, oldsize, newsize); in trunc_start() 1395 truncate_pagecache(inode, newsize); in trunc_start() [all …]
|
/fs/jfs/ |
D | inode.c | 367 loff_t newsize; in jfs_truncate_nolock() local 388 newsize = xtTruncate(tid, ip, length, in jfs_truncate_nolock() 390 if (newsize < 0) { in jfs_truncate_nolock() 402 } while (newsize > length); /* Truncate isn't always atomic */ in jfs_truncate_nolock()
|
D | jfs_xtree.h | 108 extern s64 xtTruncate(tid_t tid, struct inode *ip, s64 newsize, int type);
|
D | jfs_dmap.c | 3366 s64 newsize; in dbExtendFS() local 3376 newsize = blkno + nblocks; in dbExtendFS() 3379 (long long) blkno, (long long) nblocks, (long long) newsize); in dbExtendFS() 3389 bmp->db_mapsize = newsize; in dbExtendFS() 3393 l2agsize = dbGetL2AGSize(newsize); in dbExtendFS() 3401 bmp->db_numag = newsize >> l2agsize; in dbExtendFS() 3402 bmp->db_numag += ((u32) newsize % (u32) bmp->db_agsize) ? 1 : 0; in dbExtendFS()
|
D | jfs_xtree.c | 2188 s64 xtTruncate(tid_t tid, struct inode *ip, s64 newsize, int flag) in xtTruncate() argument 2254 teof = (newsize + (JFS_SBI(ip->i_sb)->bsize - 1)) >> in xtTruncate() 2320 newsize = (xoff + xlen) << JFS_SBI(ip->i_sb)->l2bsize; in xtTruncate() 2703 if (S_ISDIR(ip->i_mode) && !newsize) in xtTruncate() 2706 ip->i_size = newsize; in xtTruncate() 2717 return newsize; in xtTruncate()
|
/fs/f2fs/ |
D | xattr.c | 634 int found, newsize; in __f2fs_setxattr() local 711 newsize = XATTR_ALIGN(sizeof(struct f2fs_xattr_entry) + len + size); in __f2fs_setxattr() 724 if (unlikely(free < newsize)) { in __f2fs_setxattr() 759 new_hsize += newsize; in __f2fs_setxattr() 765 *(u32 *)((u8 *)last + newsize) = 0; in __f2fs_setxattr()
|
/fs/udf/ |
D | inode.c | 634 static int udf_extend_file(struct inode *inode, loff_t newsize) in udf_extend_file() argument 642 sector_t first_block = newsize >> sb->s_blocksize_bits, offset; in udf_extend_file() 685 (newsize & (sb->s_blocksize - 1)); in udf_extend_file() 1243 int udf_setsize(struct inode *inode, loff_t newsize) in udf_setsize() argument 1256 if (newsize > inode->i_size) { in udf_setsize() 1259 (udf_file_entry_alloc_offset(inode) + newsize)) { in udf_setsize() 1261 iinfo->i_lenAlloc = newsize; in udf_setsize() 1269 err = udf_extend_file(inode, newsize); in udf_setsize() 1273 truncate_setsize(inode, newsize); in udf_setsize() 1278 memset(iinfo->i_data + iinfo->i_lenEAttr + newsize, in udf_setsize() [all …]
|
/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/ntfs3/ |
D | file.c | 688 loff_t newsize, oldsize; in ntfs3_setattr() local 697 newsize = attr->ia_size; in ntfs3_setattr() 699 if (newsize <= oldsize) in ntfs3_setattr() 700 err = ntfs_truncate(inode, newsize); in ntfs3_setattr() 702 err = ntfs_extend(inode, newsize, 0, NULL); in ntfs3_setattr() 708 i_size_write(inode, newsize); in ntfs3_setattr()
|
/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()
|
D | nfs42proc.c | 293 loff_t newsize = pos + len; in nfs42_copy_dest_done() local 294 loff_t end = newsize - 1; in nfs42_copy_dest_done() 300 if (newsize > i_size_read(inode)) in nfs42_copy_dest_done() 301 i_size_write(inode, newsize); in nfs42_copy_dest_done()
|
/fs/nilfs2/ |
D | ioctl.c | 1019 __u64 newsize; in nilfs_ioctl_resize() local 1030 if (copy_from_user(&newsize, argp, sizeof(newsize))) in nilfs_ioctl_resize() 1033 ret = nilfs_resize_fs(inode->i_sb, newsize); in nilfs_ioctl_resize()
|
D | super.c | 421 int nilfs_resize_fs(struct super_block *sb, __u64 newsize) in nilfs_resize_fs() argument 431 if (newsize > devsize) in nilfs_resize_fs() 438 if (newsize < 4096) { in nilfs_resize_fs() 450 sb2off = NILFS_SB2_OFFSET_BYTES(newsize); in nilfs_resize_fs() 476 sbp[0]->s_dev_size = cpu_to_le64(newsize); in nilfs_resize_fs()
|
D | nilfs.h | 353 int nilfs_resize_fs(struct super_block *sb, __u64 newsize);
|
/fs/ext2/ |
D | inode.c | 1266 static int ext2_setsize(struct inode *inode, loff_t newsize) in ext2_setsize() argument 1281 error = dax_truncate_page(inode, newsize, NULL, in ext2_setsize() 1285 newsize, ext2_get_block); in ext2_setsize() 1290 truncate_setsize(inode, newsize); in ext2_setsize() 1291 __ext2_truncate_blocks(inode, newsize); in ext2_setsize()
|
/fs/hugetlbfs/ |
D | inode.c | 967 loff_t newsize = attr->ia_size; in hugetlbfs_setattr() local 969 if (newsize & ~huge_page_mask(h)) in hugetlbfs_setattr() 972 if ((newsize < oldsize && (info->seals & F_SEAL_SHRINK)) || in hugetlbfs_setattr() 973 (newsize > oldsize && (info->seals & F_SEAL_GROW))) in hugetlbfs_setattr() 975 hugetlb_vmtruncate(inode, newsize); in hugetlbfs_setattr()
|
/fs/ext4/ |
D | ext4.h | 3366 static inline void ext4_update_i_disksize(struct inode *inode, loff_t newsize) in ext4_update_i_disksize() argument 3371 if (newsize > EXT4_I(inode)->i_disksize) in ext4_update_i_disksize() 3372 WRITE_ONCE(EXT4_I(inode)->i_disksize, newsize); in ext4_update_i_disksize() 3377 static inline int ext4_update_inode_size(struct inode *inode, loff_t newsize) in ext4_update_inode_size() argument 3381 if (newsize > inode->i_size) { in ext4_update_inode_size() 3382 i_size_write(inode, newsize); in ext4_update_inode_size() 3385 if (newsize > EXT4_I(inode)->i_disksize) { in ext4_update_inode_size() 3386 ext4_update_i_disksize(inode, newsize); in ext4_update_inode_size()
|
/fs/nfsd/ |
D | nfs3xdr.c | 252 u64 newsize; in svcxdr_decode_sattr3() local 254 if (xdr_stream_decode_u64(xdr, &newsize) < 0) in svcxdr_decode_sattr3() 257 iap->ia_size = newsize; in svcxdr_decode_sattr3()
|
/fs/ocfs2/ |
D | namei.c | 1801 u64 newsize; in ocfs2_symlink() local 1948 newsize = l - 1; in ocfs2_symlink() 1968 (unsigned long long)newsize); in ocfs2_symlink() 1974 i_size_write(inode, newsize); in ocfs2_symlink() 1979 i_size_write(inode, newsize); in ocfs2_symlink()
|
D | aops.c | 1615 loff_t newsize = pos + len; in ocfs2_expand_nonsparse_inode() local 1619 if (newsize <= i_size_read(inode)) in ocfs2_expand_nonsparse_inode() 1622 ret = ocfs2_extend_no_holes(inode, di_bh, newsize, pos); in ocfs2_expand_nonsparse_inode()
|