Home
last modified time | relevance | path

Searched refs:newsize (Results 1 – 25 of 25) sorted by relevance

/fs/ramfs/
Dfile-nommu.c66 int ramfs_nommu_expand_for_mapping(struct inode *inode, size_t newsize) in ramfs_nommu_expand_for_mapping() argument
76 order = get_order(newsize); in ramfs_nommu_expand_for_mapping()
80 ret = inode_newsize_ok(inode, newsize); in ramfs_nommu_expand_for_mapping()
84 i_size_write(inode, newsize); in ramfs_nommu_expand_for_mapping()
94 npages = (newsize + PAGE_SIZE - 1) >> PAGE_SHIFT; in ramfs_nommu_expand_for_mapping()
103 newsize = PAGE_SIZE * npages; in ramfs_nommu_expand_for_mapping()
105 memset(data, 0, newsize); in ramfs_nommu_expand_for_mapping()
136 static int ramfs_nommu_resize(struct inode *inode, loff_t newsize, loff_t size) in ramfs_nommu_resize() argument
143 if (unlikely(newsize >> 32)) in ramfs_nommu_resize()
146 return ramfs_nommu_expand_for_mapping(inode, newsize); in ramfs_nommu_resize()
[all …]
/fs/gfs2/
Dbmap.c840 static int gfs2_journaled_truncate(struct inode *inode, u64 oldsize, u64 newsize) in gfs2_journaled_truncate() argument
847 while (oldsize != newsize) { in gfs2_journaled_truncate()
848 chunk = oldsize - newsize; in gfs2_journaled_truncate()
862 static int trunc_start(struct inode *inode, u64 oldsize, u64 newsize) in trunc_start() argument
885 gfs2_buffer_clear_tail(dibh, sizeof(struct gfs2_dinode) + newsize); in trunc_start()
887 if (newsize & (u64)(sdp->sd_sb.sb_bsize - 1)) { in trunc_start()
888 error = gfs2_block_truncate_page(mapping, newsize); in trunc_start()
895 i_size_write(inode, newsize); in trunc_start()
900 error = gfs2_journaled_truncate(inode, oldsize, newsize); in trunc_start()
902 truncate_pagecache(inode, newsize); in trunc_start()
[all …]
/fs/xfs/
Dkmem.c79 kmem_realloc(const void *old, size_t newsize, xfs_km_flags_t flags) in kmem_realloc() argument
86 ptr = krealloc(old, newsize, lflags); in kmem_realloc()
93 newsize, __func__, lflags); in kmem_realloc()
Dxfs_iops.c828 xfs_off_t oldsize, newsize; in xfs_setattr_size() local
841 newsize = iattr->ia_size; in xfs_setattr_size()
846 if (newsize == 0 && oldsize == 0 && ip->i_d.di_nextents == 0) { in xfs_setattr_size()
879 if (newsize > oldsize) { in xfs_setattr_size()
880 error = xfs_zero_eof(ip, newsize, oldsize, &did_zeroing); in xfs_setattr_size()
882 error = iomap_truncate_page(inode, newsize, &did_zeroing, in xfs_setattr_size()
910 truncate_setsize(inode, newsize); in xfs_setattr_size()
921 (newsize > ip->i_d.di_size && oldsize != ip->i_d.di_size)) { in xfs_setattr_size()
923 ip->i_d.di_size, newsize - 1); in xfs_setattr_size()
946 if (newsize != oldsize && in xfs_setattr_size()
[all …]
/fs/xfs/libxfs/
Dxfs_dir2_sf.c888 int newsize; /* new inode size */ in xfs_dir2_sf_removename() local
933 newsize = oldsize - entsize; in xfs_dir2_sf_removename()
944 dp->i_d.di_size = newsize; in xfs_dir2_sf_removename()
948 xfs_idata_realloc(dp, newsize - oldsize, XFS_DATA_FORK); in xfs_dir2_sf_removename()
1000 int newsize; /* new inode size */ in xfs_dir2_sf_replace() local
1002 newsize = dp->i_df.if_bytes + (sfp->count + 1) * XFS_INO64_DIFF; in xfs_dir2_sf_replace()
1006 if (newsize > XFS_IFORK_DSIZE(dp)) { in xfs_dir2_sf_replace()
1099 int newsize; /* new inode size */ in xfs_dir2_sf_toino4() local
1123 newsize = oldsize - (oldsfp->count + 1) * XFS_INO64_DIFF; in xfs_dir2_sf_toino4()
1125 xfs_idata_realloc(dp, newsize, XFS_DATA_FORK); in xfs_dir2_sf_toino4()
[all …]
Dxfs_attr.c503 int newsize, forkoff, retval; in xfs_attr_shortform_addname() local
528 newsize = XFS_ATTR_SF_TOTSIZE(args->dp); in xfs_attr_shortform_addname()
529 newsize += XFS_ATTR_SF_ENTSIZE_BYNAME(args->namelen, args->valuelen); in xfs_attr_shortform_addname()
531 forkoff = xfs_attr_shortform_bytesfit(args->dp, newsize); in xfs_attr_shortform_addname()
/fs/jfs/
Dinode.c377 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()
Djfs_xtree.h118 extern s64 xtTruncate(tid_t tid, struct inode *ip, s64 newsize, int type);
Djfs_dmap.c3389 s64 newsize; in dbExtendFS() local
3399 newsize = blkno + nblocks; in dbExtendFS()
3402 (long long) blkno, (long long) nblocks, (long long) newsize); in dbExtendFS()
3412 bmp->db_mapsize = newsize; in dbExtendFS()
3416 l2agsize = dbGetL2AGSize(newsize); in dbExtendFS()
3424 bmp->db_numag = newsize >> l2agsize; in dbExtendFS()
3425 bmp->db_numag += ((u32) newsize % (u32) bmp->db_agsize) ? 1 : 0; in dbExtendFS()
Djfs_xtree.c3162 s64 xtTruncate(tid_t tid, struct inode *ip, s64 newsize, int flag) in xtTruncate() argument
3228 teof = (newsize + (JFS_SBI(ip->i_sb)->bsize - 1)) >> in xtTruncate()
3294 newsize = (xoff + xlen) << JFS_SBI(ip->i_sb)->l2bsize; in xtTruncate()
3677 if (S_ISDIR(ip->i_mode) && !newsize) in xtTruncate()
3680 ip->i_size = newsize; in xtTruncate()
3691 return newsize; in xtTruncate()
/fs/udf/
Dinode.c617 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()
657 partial_final_block = newsize & (sb->s_blocksize - 1); in udf_extend_file()
675 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/affs/
Dfile.c540 affs_extent_file_ofs(struct inode *inode, u32 newsize) in affs_extent_file_ofs() argument
548 pr_debug("%s(%lu, %d)\n", __func__, inode->i_ino, newsize); in affs_extent_file_ofs()
558 tmp = min(bsize - boff, newsize - size); in affs_extent_file_ofs()
572 while (size < newsize) { in affs_extent_file_ofs()
577 tmp = min(bsize, newsize - size); in affs_extent_file_ofs()
602 inode->i_size = AFFS_I(inode)->mmu_private = newsize; in affs_extent_file_ofs()
606 inode->i_size = AFFS_I(inode)->mmu_private = newsize; in affs_extent_file_ofs()
/fs/ext2/
Dinode.c1278 static int ext2_setsize(struct inode *inode, loff_t newsize) in ext2_setsize() argument
1293 error = iomap_zero_range(inode, newsize, in ext2_setsize()
1294 PAGE_ALIGN(newsize) - newsize, NULL, in ext2_setsize()
1298 newsize, ext2_get_block); in ext2_setsize()
1301 newsize, ext2_get_block); in ext2_setsize()
1306 truncate_setsize(inode, newsize); in ext2_setsize()
1307 __ext2_truncate_blocks(inode, newsize); in ext2_setsize()
/fs/f2fs/
Dxattr.c585 int found, newsize; in __f2fs_setxattr() local
630 newsize = XATTR_ALIGN(sizeof(struct f2fs_xattr_entry) + len + size); in __f2fs_setxattr()
643 if (unlikely(free < newsize)) { in __f2fs_setxattr()
678 new_hsize += newsize; in __f2fs_setxattr()
/fs/nfs/
Dnfs4session.c38 static void nfs4_shrink_slot_table(struct nfs4_slot_table *tbl, u32 newsize) in nfs4_shrink_slot_table() argument
41 if (newsize >= tbl->max_slots) in nfs4_shrink_slot_table()
45 while (newsize--) in nfs4_shrink_slot_table()
/fs/nilfs2/
Dioctl.c1049 __u64 newsize; in nilfs_ioctl_resize() local
1060 if (copy_from_user(&newsize, argp, sizeof(newsize))) in nilfs_ioctl_resize()
1063 ret = nilfs_resize_fs(inode->i_sb, newsize); in nilfs_ioctl_resize()
Dsuper.c409 int nilfs_resize_fs(struct super_block *sb, __u64 newsize) in nilfs_resize_fs() argument
419 if (newsize > devsize) in nilfs_resize_fs()
429 sb2off = NILFS_SB2_OFFSET_BYTES(newsize); in nilfs_resize_fs()
455 sbp[0]->s_dev_size = cpu_to_le64(newsize); in nilfs_resize_fs()
Dnilfs.h344 int nilfs_resize_fs(struct super_block *sb, __u64 newsize);
/fs/ext4/
Dext4.h2883 static inline void ext4_update_i_disksize(struct inode *inode, loff_t newsize) in ext4_update_i_disksize() argument
2888 if (newsize > EXT4_I(inode)->i_disksize) in ext4_update_i_disksize()
2889 WRITE_ONCE(EXT4_I(inode)->i_disksize, newsize); in ext4_update_i_disksize()
2894 static inline int ext4_update_inode_size(struct inode *inode, loff_t newsize) in ext4_update_inode_size() argument
2898 if (newsize > inode->i_size) { in ext4_update_inode_size()
2899 i_size_write(inode, newsize); in ext4_update_inode_size()
2902 if (newsize > EXT4_I(inode)->i_disksize) { in ext4_update_inode_size()
2903 ext4_update_i_disksize(inode, newsize); in ext4_update_inode_size()
/fs/exofs/
Dinode.c1002 static int _do_truncate(struct inode *inode, loff_t newsize) in _do_truncate() argument
1010 ret = ore_truncate(&sbi->layout, &oi->oc, (u64)newsize); in _do_truncate()
1012 truncate_setsize(inode, newsize); in _do_truncate()
1015 inode->i_ino, newsize, ret); in _do_truncate()
Dore.c1106 __be64 newsize; in ore_truncate() member
1142 size_attr->newsize = cpu_to_be64(obj_size); in ore_truncate()
1144 size_attr->attr.val_ptr = &size_attr->newsize; in ore_truncate()
/fs/nfsd/
Dnfs3xdr.c120 u64 newsize; in decode_sattr3() local
123 p = xdr_decode_hyper(p, &newsize); in decode_sattr3()
124 iap->ia_size = min_t(u64, newsize, NFS_OFFSET_MAX); in decode_sattr3()
/fs/ocfs2/
Dnamei.c1799 u64 newsize; in ocfs2_symlink() local
1945 newsize = l - 1; in ocfs2_symlink()
1965 (unsigned long long)newsize); in ocfs2_symlink()
1971 i_size_write(inode, newsize); in ocfs2_symlink()
1976 i_size_write(inode, newsize); in ocfs2_symlink()
Daops.c1639 loff_t newsize = pos + len; in ocfs2_expand_nonsparse_inode() local
1643 if (newsize <= i_size_read(inode)) in ocfs2_expand_nonsparse_inode()
1646 ret = ocfs2_extend_no_holes(inode, di_bh, newsize, pos); in ocfs2_expand_nonsparse_inode()
/fs/btrfs/
Dinode.c5159 loff_t newsize = attr->ia_size; in btrfs_setsize() local
5169 if (newsize != oldsize) { in btrfs_setsize()
5176 if (newsize > oldsize) { in btrfs_setsize()
5185 ret = btrfs_cont_expand(inode, oldsize, newsize); in btrfs_setsize()
5197 i_size_write(inode, newsize); in btrfs_setsize()
5199 pagecache_isize_extended(inode, oldsize, newsize); in btrfs_setsize()
5210 if (newsize == 0) in btrfs_setsize()
5238 truncate_setsize(inode, newsize); in btrfs_setsize()