Home
last modified time | relevance | path

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

/fs/ramfs/
Dfile-nommu.c62 int ramfs_nommu_expand_for_mapping(struct inode *inode, size_t newsize) in ramfs_nommu_expand_for_mapping() argument
71 order = get_order(newsize); in ramfs_nommu_expand_for_mapping()
75 ret = inode_newsize_ok(inode, newsize); in ramfs_nommu_expand_for_mapping()
79 i_size_write(inode, newsize); in ramfs_nommu_expand_for_mapping()
89 npages = (newsize + PAGE_SIZE - 1) >> PAGE_SHIFT; in ramfs_nommu_expand_for_mapping()
98 newsize = PAGE_SIZE * npages; in ramfs_nommu_expand_for_mapping()
100 memset(data, 0, newsize); in ramfs_nommu_expand_for_mapping()
131 static int ramfs_nommu_resize(struct inode *inode, loff_t newsize, loff_t size) in ramfs_nommu_resize() argument
138 if (unlikely(newsize >> 32)) in ramfs_nommu_resize()
141 return ramfs_nommu_expand_for_mapping(inode, newsize); in ramfs_nommu_resize()
[all …]
/fs/xfs/
Dkmem.c89 kmem_realloc(const void *ptr, size_t newsize, size_t oldsize, in kmem_realloc() argument
94 new = kmem_alloc(newsize, flags); in kmem_realloc()
98 ((oldsize < newsize) ? oldsize : newsize)); in kmem_realloc()
Dxfs_dir2_sf.c961 int newsize; /* new inode size */ in xfs_dir2_sf_removename() local
1006 newsize = oldsize - entsize; in xfs_dir2_sf_removename()
1017 dp->i_d.di_size = newsize; in xfs_dir2_sf_removename()
1021 xfs_idata_realloc(dp, newsize - oldsize, XFS_DATA_FORK); in xfs_dir2_sf_removename()
1079 int newsize; /* new inode size */ in xfs_dir2_sf_replace() local
1081 newsize = in xfs_dir2_sf_replace()
1089 if (newsize > XFS_IFORK_DSIZE(dp)) { in xfs_dir2_sf_replace()
1191 int newsize; /* new inode size */ in xfs_dir2_sf_toino4() local
1215 newsize = in xfs_dir2_sf_toino4()
1220 xfs_idata_realloc(dp, newsize, XFS_DATA_FORK); in xfs_dir2_sf_toino4()
[all …]
Dxfs_iops.c710 xfs_off_t oldsize, newsize; in xfs_setattr_size() local
738 newsize = iattr->ia_size; in xfs_setattr_size()
743 if (newsize == 0 && oldsize == 0 && ip->i_d.di_nextents == 0) { in xfs_setattr_size()
769 if (newsize > oldsize) { in xfs_setattr_size()
776 error = xfs_zero_eof(ip, newsize, oldsize); in xfs_setattr_size()
793 if (oldsize != ip->i_d.di_size && newsize > ip->i_d.di_size) { in xfs_setattr_size()
795 ip->i_d.di_size, newsize); in xfs_setattr_size()
805 error = -block_truncate_page(inode->i_mapping, newsize, xfs_get_blocks); in xfs_setattr_size()
816 truncate_setsize(inode, newsize); in xfs_setattr_size()
835 if (newsize != oldsize && (!(mask & (ATTR_CTIME | ATTR_MTIME)))) { in xfs_setattr_size()
[all …]
Dxfs_attr.c848 int newsize, forkoff, retval; in xfs_attr_shortform_addname() local
866 newsize = XFS_ATTR_SF_TOTSIZE(args->dp); in xfs_attr_shortform_addname()
867 newsize += XFS_ATTR_SF_ENTSIZE_BYNAME(args->namelen, args->valuelen); in xfs_attr_shortform_addname()
869 forkoff = xfs_attr_shortform_bytesfit(args->dp, newsize); in xfs_attr_shortform_addname()
/fs/gfs2/
Dbmap.c1008 static int gfs2_journaled_truncate(struct inode *inode, u64 oldsize, u64 newsize) in gfs2_journaled_truncate() argument
1015 while (oldsize != newsize) { in gfs2_journaled_truncate()
1016 chunk = oldsize - newsize; in gfs2_journaled_truncate()
1030 static int trunc_start(struct inode *inode, u64 oldsize, u64 newsize) in trunc_start() argument
1053 gfs2_buffer_clear_tail(dibh, sizeof(struct gfs2_dinode) + newsize); in trunc_start()
1055 if (newsize & (u64)(sdp->sd_sb.sb_bsize - 1)) { in trunc_start()
1056 error = gfs2_block_truncate_page(mapping, newsize); in trunc_start()
1063 i_size_write(inode, newsize); in trunc_start()
1068 error = gfs2_journaled_truncate(inode, oldsize, newsize); in trunc_start()
1070 truncate_pagecache(inode, oldsize, newsize); in trunc_start()
[all …]
/fs/jfs/
Dinode.c376 loff_t newsize; in jfs_truncate_nolock() local
397 newsize = xtTruncate(tid, ip, length, in jfs_truncate_nolock()
399 if (newsize < 0) { in jfs_truncate_nolock()
411 } while (newsize > length); /* Truncate isn't always atomic */ in jfs_truncate_nolock()
Djfs_xtree.h125 extern s64 xtTruncate(tid_t tid, struct inode *ip, s64 newsize, int type);
Djfs_dmap.c3403 s64 newsize; in dbExtendFS() local
3413 newsize = blkno + nblocks; in dbExtendFS()
3416 (long long) blkno, (long long) nblocks, (long long) newsize); in dbExtendFS()
3426 bmp->db_mapsize = newsize; in dbExtendFS()
3430 l2agsize = dbGetL2AGSize(newsize); in dbExtendFS()
3438 bmp->db_numag = newsize >> l2agsize; in dbExtendFS()
3439 bmp->db_numag += ((u32) newsize % (u32) bmp->db_agsize) ? 1 : 0; in dbExtendFS()
Djfs_xtree.c3163 s64 xtTruncate(tid_t tid, struct inode *ip, s64 newsize, int flag) in xtTruncate() argument
3229 teof = (newsize + (JFS_SBI(ip->i_sb)->bsize - 1)) >> in xtTruncate()
3295 newsize = (xoff + xlen) << JFS_SBI(ip->i_sb)->l2bsize; in xtTruncate()
3678 if (S_ISDIR(ip->i_mode) && !newsize) in xtTruncate()
3681 ip->i_size = newsize; in xtTruncate()
3692 return newsize; in xtTruncate()
/fs/f2fs/
Dxattr.c307 int error, found, free, newsize; in f2fs_setxattr() local
386 newsize = XATTR_ALIGN(sizeof(struct f2fs_xattr_entry) + in f2fs_setxattr()
398 if (free < newsize) { in f2fs_setxattr()
421 memset(last, 0, newsize); in f2fs_setxattr()
/fs/udf/
Dinode.c601 static int udf_extend_file(struct inode *inode, loff_t newsize) in udf_extend_file() argument
609 sector_t first_block = newsize >> sb->s_blocksize_bits, offset; in udf_extend_file()
628 if (newsize & (sb->s_blocksize - 1)) in udf_extend_file()
652 iinfo->i_lenExtents = newsize; in udf_extend_file()
1207 int udf_setsize(struct inode *inode, loff_t newsize) in udf_setsize() argument
1220 if (newsize > inode->i_size) { in udf_setsize()
1224 (udf_file_entry_alloc_offset(inode) + newsize)) { in udf_setsize()
1230 iinfo->i_lenAlloc = newsize; in udf_setsize()
1234 err = udf_extend_file(inode, newsize); in udf_setsize()
1240 truncate_setsize(inode, newsize); in udf_setsize()
[all …]
/fs/affs/
Dfile.c537 affs_extent_file_ofs(struct inode *inode, u32 newsize) in affs_extent_file_ofs() argument
545 pr_debug("AFFS: extent_file(%u, %d)\n", (u32)inode->i_ino, newsize); in affs_extent_file_ofs()
555 tmp = min(bsize - boff, newsize - size); in affs_extent_file_ofs()
569 while (size < newsize) { in affs_extent_file_ofs()
574 tmp = min(bsize, newsize - size); in affs_extent_file_ofs()
596 inode->i_size = AFFS_I(inode)->mmu_private = newsize; in affs_extent_file_ofs()
600 inode->i_size = AFFS_I(inode)->mmu_private = newsize; in affs_extent_file_ofs()
/fs/nfs/
Dnfs4session.c29 static void nfs4_shrink_slot_table(struct nfs4_slot_table *tbl, u32 newsize) in nfs4_shrink_slot_table() argument
32 if (newsize >= tbl->max_slots) in nfs4_shrink_slot_table()
36 while (newsize--) in nfs4_shrink_slot_table()
/fs/nilfs2/
Dioctl.c716 __u64 newsize; in nilfs_ioctl_resize() local
727 if (copy_from_user(&newsize, argp, sizeof(newsize))) in nilfs_ioctl_resize()
730 ret = nilfs_resize_fs(inode->i_sb, newsize); in nilfs_ioctl_resize()
Dsuper.c411 int nilfs_resize_fs(struct super_block *sb, __u64 newsize) in nilfs_resize_fs() argument
421 if (newsize > devsize) in nilfs_resize_fs()
431 sb2off = NILFS_SB2_OFFSET_BYTES(newsize); in nilfs_resize_fs()
457 sbp[0]->s_dev_size = cpu_to_le64(newsize); in nilfs_resize_fs()
Dnilfs.h309 int nilfs_resize_fs(struct super_block *sb, __u64 newsize);
/fs/ext2/
Dinode.c1188 static int ext2_setsize(struct inode *inode, loff_t newsize) in ext2_setsize() argument
1203 error = xip_truncate_page(inode->i_mapping, newsize); in ext2_setsize()
1206 newsize, ext2_get_block); in ext2_setsize()
1209 newsize, ext2_get_block); in ext2_setsize()
1213 truncate_setsize(inode, newsize); in ext2_setsize()
1214 __ext2_truncate_blocks(inode, newsize); in ext2_setsize()
/fs/ext4/
Dext4.h2642 static inline void ext4_update_i_disksize(struct inode *inode, loff_t newsize) in ext4_update_i_disksize() argument
2647 if (newsize > EXT4_I(inode)->i_disksize) in ext4_update_i_disksize()
2648 EXT4_I(inode)->i_disksize = newsize; in ext4_update_i_disksize()
2653 static inline int ext4_update_inode_size(struct inode *inode, loff_t newsize) in ext4_update_inode_size() argument
2657 if (newsize > inode->i_size) { in ext4_update_inode_size()
2658 i_size_write(inode, newsize); in ext4_update_inode_size()
2661 if (newsize > EXT4_I(inode)->i_disksize) { in ext4_update_inode_size()
2662 ext4_update_i_disksize(inode, newsize); in ext4_update_inode_size()
/fs/nfsd/
Dnfs3xdr.c119 u64 newsize; in decode_sattr3() local
122 p = xdr_decode_hyper(p, &newsize); in decode_sattr3()
123 if (newsize <= NFS_OFFSET_MAX) in decode_sattr3()
124 iap->ia_size = newsize; in decode_sattr3()
/fs/exofs/
Dinode.c1001 static int _do_truncate(struct inode *inode, loff_t newsize) in _do_truncate() argument
1009 ret = ore_truncate(&sbi->layout, &oi->oc, (u64)newsize); in _do_truncate()
1011 truncate_setsize(inode, newsize); in _do_truncate()
1014 inode->i_ino, newsize, ret); in _do_truncate()
Dore.c1061 __be64 newsize; in ore_truncate() member
1097 size_attr->newsize = cpu_to_be64(obj_size); in ore_truncate()
1099 size_attr->attr.val_ptr = &size_attr->newsize; in ore_truncate()
/fs/ocfs2/
Dnamei.c1586 u64 newsize; in ocfs2_symlink() local
1726 newsize = l - 1; in ocfs2_symlink()
1745 (unsigned long long)newsize); in ocfs2_symlink()
1751 i_size_write(inode, newsize); in ocfs2_symlink()
1756 i_size_write(inode, newsize); in ocfs2_symlink()
Daops.c1634 loff_t newsize = pos + len; in ocfs2_expand_nonsparse_inode() local
1638 if (newsize <= i_size_read(inode)) in ocfs2_expand_nonsparse_inode()
1641 ret = ocfs2_extend_no_holes(inode, di_bh, newsize, pos); in ocfs2_expand_nonsparse_inode()
/fs/btrfs/
Dinode.c4508 loff_t newsize = attr->ia_size; in btrfs_setsize() local
4512 if (newsize == oldsize) in btrfs_setsize()
4521 if (newsize != oldsize && (!(mask & (ATTR_CTIME | ATTR_MTIME)))) in btrfs_setsize()
4524 if (newsize > oldsize) { in btrfs_setsize()
4525 truncate_pagecache(inode, oldsize, newsize); in btrfs_setsize()
4526 ret = btrfs_cont_expand(inode, oldsize, newsize); in btrfs_setsize()
4534 i_size_write(inode, newsize); in btrfs_setsize()
4545 if (newsize == 0) in btrfs_setsize()
4573 truncate_setsize(inode, newsize); in btrfs_setsize()