Home
last modified time | relevance | path

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

12

/linux/fs/ramfs/
H A Dfile-nommu.c62 int ramfs_nommu_expand_for_mapping(struct inode *inode, size_t newsize) in ramfs_nommu_expand_for_mapping() argument
72 if (!newsize) in ramfs_nommu_expand_for_mapping()
75 order = get_order(newsize); in ramfs_nommu_expand_for_mapping()
79 ret = inode_newsize_ok(inode, newsize); in ramfs_nommu_expand_for_mapping()
83 i_size_write(inode, newsize); in ramfs_nommu_expand_for_mapping()
93 npages = (newsize + PAGE_SIZE - 1) >> PAGE_SHIFT; in ramfs_nommu_expand_for_mapping()
102 newsize = PAGE_SIZE * npages; in ramfs_nommu_expand_for_mapping()
104 memset(data, 0, newsize); in ramfs_nommu_expand_for_mapping()
135 static int ramfs_nommu_resize(struct inode *inode, loff_t newsize, loff_t size) in ramfs_nommu_resize() argument
142 if (unlikely(newsize >> 32)) in ramfs_nommu_resize()
[all …]
/linux/drivers/acpi/x86/
H A Dapple.c30 unsigned int i, j = 0, newsize = 0, numprops, numvalid; in acpi_extract_apple_properties() local
79 newsize += key->string.length + 1; in acpi_extract_apple_properties()
81 newsize += val->buffer.length; in acpi_extract_apple_properties()
83 newsize += val->string.length + 1; in acpi_extract_apple_properties()
95 newsize += (1 + 3 * numvalid) * sizeof(union acpi_object); in acpi_extract_apple_properties()
96 newprops = ACPI_ALLOCATE_ZEROED(newsize); in acpi_extract_apple_properties()
140 WARN_ON(free_space != (void *)newprops + newsize); in acpi_extract_apple_properties()
/linux/fs/ntfs/
H A Dattrib.h112 int __ntfs_attr_truncate_vfs(struct ntfs_inode *ni, const s64 newsize,
114 int ntfs_attr_expand(struct ntfs_inode *ni, const s64 newsize, const s64 prealloc_size);
115 int ntfs_attr_expand_locked(struct ntfs_inode *ni, const s64 newsize,
118 int ntfs_attr_truncate_i(struct ntfs_inode *ni, const s64 newsize, unsigned int holes);
119 int ntfs_attr_truncate_i_locked(struct ntfs_inode *ni, const s64 newsize,
122 int ntfs_attr_truncate(struct ntfs_inode *ni, const s64 newsize);
H A Dattrib.c4286 * @newsize: new size (in bytes) to which to shrink the attribute in ntfs_non_resident_attr_shrink()
4287 * @pagecache_truncated: page cache was already truncated to @newsize in ntfs_non_resident_attr_shrink()
4289 * Reduce the size of a non-resident, open ntfs attribute @na to @newsize bytes. in ntfs_non_resident_attr_shrink()
4292 const s64 newsize, in ntfs_non_resident_attr_shrink()
4305 (unsigned long long)ni->mft_no, ni->type, (long long)newsize); in ntfs_non_resident_attr_shrink()
4316 * against @newsize and fail if @newsize is too small. in ntfs_non_resident_attr_shrink()
4318 err = ntfs_attr_size_bounds_check(vol, ni->type, newsize); in ntfs_non_resident_attr_shrink()
4336 ((newsize - 1) | (ni->itype.compressed.block_size - 1)) + 1); in ntfs_non_resident_attr_shrink()
4339 ntfs_bytes_to_cluster(vol, newsize in ntfs_non_resident_attr_shrink()
4241 ntfs_non_resident_attr_shrink(struct ntfs_inode * ni,const s64 newsize,struct ntfs_inode * locked_ni) ntfs_non_resident_attr_shrink() argument
4439 ntfs_non_resident_attr_expand(struct ntfs_inode * ni,const s64 newsize,const s64 prealloc_size,unsigned int holes,struct ntfs_inode * locked_ni) ntfs_non_resident_attr_expand() argument
4733 ntfs_resident_attr_resize(struct ntfs_inode * attr_ni,const s64 newsize,const s64 prealloc_size,unsigned int holes) ntfs_resident_attr_resize() argument
4970 __ntfs_attr_truncate_vfs(struct ntfs_inode * ni,const s64 newsize,const s64 i_size) __ntfs_attr_truncate_vfs() argument
5003 ntfs_attr_expand_locked(struct ntfs_inode * ni,const s64 newsize,const s64 prealloc_size,struct ntfs_inode * locked_ni) ntfs_attr_expand_locked() argument
5049 ntfs_attr_expand(struct ntfs_inode * ni,const s64 newsize,const s64 prealloc_size) ntfs_attr_expand() argument
5067 ntfs_attr_truncate_i_locked(struct ntfs_inode * ni,const s64 newsize,unsigned int holes,struct ntfs_inode * locked_ni) ntfs_attr_truncate_i_locked() argument
5114 ntfs_attr_truncate_i(struct ntfs_inode * ni,const s64 newsize,unsigned int holes) ntfs_attr_truncate_i() argument
5123 ntfs_attr_truncate(struct ntfs_inode * ni,const s64 newsize) ntfs_attr_truncate() argument
[all...]
/linux/security/apparmor/
H A Dlib.c122 bool aa_resize_str_table(struct aa_str_table *t, int newsize, gfp_t gfp) in aa_resize_str_table() argument
127 if (t->size == newsize) in aa_resize_str_table()
129 n = kzalloc_objs(*n, newsize, gfp); in aa_resize_str_table()
132 for (i = 0; i < min(t->size, newsize); i++) in aa_resize_str_table()
136 if (newsize > t->size) in aa_resize_str_table()
137 memset(&n[t->size], 0, (newsize-t->size)*sizeof(*n)); in aa_resize_str_table()
140 t->size = newsize; in aa_resize_str_table()
/linux/mm/
H A Dreadahead.c392 unsigned long newsize = roundup_pow_of_two(size); in get_init_ra_size() local
394 if (newsize <= max / 32) in get_init_ra_size()
395 newsize = newsize * 4; in get_init_ra_size()
396 else if (newsize <= max / 4) in get_init_ra_size()
397 newsize = newsize * 2; in get_init_ra_size()
399 newsize = max; in get_init_ra_size()
401 return newsize; in get_init_ra_size()
/linux/include/linux/
H A Dramfs.h14 ramfs_nommu_expand_for_mapping(struct inode *inode, size_t newsize) in ramfs_nommu_expand_for_mapping() argument
19 extern int ramfs_nommu_expand_for_mapping(struct inode *inode, size_t newsize);
/linux/fs/xfs/
H A Dxfs_iops.c932 xfs_off_t newsize = iattr->ia_size; in xfs_vn_setattr_size()
954 if (newsize == 0 && oldsize == 0 && ip->i_df.if_nextents == 0) { in xfs_vn_setattr_size()
1009 if (newsize > oldsize) { in xfs_vn_setattr_size()
1010 trace_xfs_zero_eof(ip, oldsize, newsize - oldsize); in xfs_vn_setattr_size()
1011 error = xfs_zero_range(ip, oldsize, newsize - oldsize, in xfs_vn_setattr_size()
1014 error = xfs_truncate_page(ip, newsize, &ac, &did_zeroing); in xfs_vn_setattr_size()
1040 * And we update in-core i_size and truncate page cache beyond newsize in xfs_vn_setattr_size()
1041 * before writeback the [i_disk_size, newsize] range, so we're in xfs_vn_setattr_size()
1044 truncate_setsize(inode, newsize); in xfs_vn_setattr_size()
1055 (newsize > i in xfs_vn_setattr_size()
914 xfs_off_t newsize = iattr->ia_size; xfs_vn_setattr_size() local
[all...]
/linux/fs/ceph/
H A Dquota.c452 * @newsize: new size if write succeeds
455 * @newsize; it returns false otherwise.
457 bool ceph_quota_is_max_bytes_exceeded(struct inode *inode, loff_t newsize) in ceph_quota_is_max_bytes_exceeded() argument
465 if (newsize <= size) in ceph_quota_is_max_bytes_exceeded()
468 return check_quota_exceeded(inode, QUOTA_CHECK_MAX_BYTES_OP, (newsize - size)); in ceph_quota_is_max_bytes_exceeded()
474 * @newsize: new size if write succeeds
476 * This function returns true if the new file size @newsize will be consuming
479 bool ceph_quota_is_max_bytes_approaching(struct inode *inode, loff_t newsize) in ceph_quota_is_max_bytes_approaching() argument
487 if (newsize <= size) in ceph_quota_is_max_bytes_approaching()
491 (newsize in ceph_quota_is_max_bytes_approaching()
[all...]
/linux/arch/sh/mm/
H A Dpmb.c657 unsigned long span, newsize; in pmb_merge() local
661 span = newsize = head->size; in pmb_merge()
668 newsize = span; in pmb_merge()
683 if (!depth || !pmb_size_valid(newsize)) in pmb_merge()
687 head->flags |= pmb_size_to_flags(newsize); in pmb_merge()
689 head->size = newsize; in pmb_merge()
/linux/fs/gfs2/
H A Dbmap.c1346 * @newsize: The new smaller size
1353 static int gfs2_journaled_truncate(struct inode *inode, u64 oldsize, u64 newsize) in gfs2_journaled_truncate() argument
1360 while (oldsize != newsize) { in gfs2_journaled_truncate()
1364 chunk = oldsize - newsize; in gfs2_journaled_truncate()
1388 static int trunc_start(struct inode *inode, u64 newsize) in trunc_start() argument
1400 unsigned int offs = newsize & (blocksize - 1); in trunc_start()
1402 error = gfs2_block_zero_range(inode, newsize, in trunc_start()
1422 gfs2_buffer_clear_tail(dibh, sizeof(struct gfs2_dinode) + newsize); in trunc_start()
1426 i_size_write(inode, newsize); in trunc_start()
1431 error = gfs2_journaled_truncate(inode, oldsize, newsize); in trunc_start()
2057 do_shrink(struct inode * inode,u64 newsize) do_shrink() argument
2168 gfs2_setattr_size(struct inode * inode,u64 newsize) gfs2_setattr_size() argument
[all...]
/linux/arch/s390/mm/
H A Ddump_pagetables.c295 size_t newsize; in add_marker() local
297 newsize = (markers_cnt + 2) * sizeof(*markers); in add_marker()
298 new = kvrealloc(markers, newsize, GFP_KERNEL); in add_marker()
/linux/fs/f2fs/
H A Dxattr.c641 int found, newsize; in __f2fs_setxattr()
720 newsize = XATTR_ALIGN(sizeof(struct f2fs_xattr_entry) + len + size); in __f2fs_setxattr()
733 if (unlikely(free < newsize)) { in __f2fs_setxattr()
768 new_hsize += newsize; in __f2fs_setxattr()
774 *(u32 *)((u8 *)last + newsize) = 0; in __f2fs_setxattr()
640 int found, newsize; __f2fs_setxattr() local
/linux/fs/udf/
H A Dinode.c654 static int udf_extend_file(struct inode *inode, loff_t newsize) in udf_do_extend_final_block()
662 sector_t first_block = newsize >> sb->s_blocksize_bits, offset; in udf_extend_file()
709 (newsize & (sb->s_blocksize - 1)); in udf_extend_file()
1278 int udf_setsize(struct inode *inode, loff_t newsize) in udf_bread()
1289 if (newsize > inode->i_size) { in udf_setsize()
1292 (udf_file_entry_alloc_offset(inode) + newsize)) { in udf_setsize()
1294 iinfo->i_lenAlloc = newsize; in udf_setsize()
1302 err = udf_extend_file(inode, newsize); in udf_setsize()
1306 truncate_setsize(inode, newsize); in udf_setsize()
1311 memset(iinfo->i_data + iinfo->i_lenEAttr + newsize, in udf_setsize()
656 udf_extend_file(struct inode * inode,loff_t newsize) udf_extend_file() argument
1280 udf_setsize(struct inode * inode,loff_t newsize) udf_setsize() argument
[all...]
/linux/drivers/md/
H A Dmd-cluster.h34 int (*resize_bitmaps)(struct mddev *mddev, sector_t newsize, sector_t oldsize);
/linux/drivers/md/bcache/
H A Dbset.c134 size_t newsize = oldsize + u64s; in __bch_keylist_realloc() local
138 newsize = roundup_pow_of_two(newsize); in __bch_keylist_realloc()
140 if (newsize <= KEYLIST_INLINE || in __bch_keylist_realloc()
141 roundup_pow_of_two(oldsize) == newsize) in __bch_keylist_realloc()
144 new_keys = krealloc(old_keys, sizeof(uint64_t) * newsize, GFP_NOIO); in __bch_keylist_realloc()
/linux/fs/nfs/
H A Dnfs4session.c39 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()
H A Ddirect.c137 loff_t newsize = offset + (loff_t)count; in nfs_direct_file_adjust_size_locked() local
140 if (newsize > oldsize) { in nfs_direct_file_adjust_size_locked()
141 i_size_write(inode, newsize); in nfs_direct_file_adjust_size_locked()
143 trace_nfs_size_grow(inode, newsize); in nfs_direct_file_adjust_size_locked()
/linux/drivers/block/rnbd/
H A Drnbd-clt.h141 int rnbd_clt_resize_disk(struct rnbd_clt_dev *dev, sector_t newsize);
/linux/fs/jfs/
H A Djfs_xtree.h108 extern s64 xtTruncate(tid_t tid, struct inode *ip, s64 newsize, int type);
/linux/arch/mips/boot/tools/
H A Drelocs.c456 unsigned long newsize = r->size + 50000; in add_reloc() local
457 void *mem = realloc(r->offset, newsize * sizeof(r->offset[0])); in add_reloc()
463 r->size = newsize; in add_reloc()
/linux/fs/nilfs2/
H A Dioctl.c1011 __u64 newsize; in nilfs_ioctl_resize() local
1022 if (copy_from_user(&newsize, argp, sizeof(newsize))) in nilfs_ioctl_resize()
1025 ret = nilfs_resize_fs(inode->i_sb, newsize); in nilfs_ioctl_resize()
/linux/security/
H A Dcommoncap.c581 size_t newsize; in cap_convert_nscap() local
606 newsize = sizeof(struct vfs_ns_cap_data); in cap_convert_nscap()
607 nscap = kmalloc(newsize, GFP_ATOMIC); in cap_convert_nscap()
619 return newsize; in cap_convert_nscap()
/linux/fs/ntfs3/
H A Dfile.c731 loff_t newsize, oldsize; in ntfs_setattr()
740 newsize = attr->ia_size; in ntfs_setattr()
742 if (newsize != oldsize) { in ntfs_setattr()
743 truncate_setsize(inode, newsize); in ntfs_setattr()
745 err = ntfs_set_size(inode, newsize); in ntfs_setattr()
727 loff_t newsize, oldsize; ntfs_setattr() local
/linux/fs/hugetlbfs/
H A Dinode.c855 loff_t newsize = attr->ia_size; in hugetlbfs_setattr()
857 if (newsize & ~huge_page_mask(h)) in hugetlbfs_setattr()
860 if ((newsize < oldsize && (info->seals & F_SEAL_SHRINK)) || in hugetlbfs_setattr()
861 (newsize > oldsize && (info->seals & F_SEAL_GROW))) in hugetlbfs_setattr()
863 hugetlb_vmtruncate(inode, newsize);
848 loff_t newsize = attr->ia_size; hugetlbfs_setattr() local

12