Home
last modified time | relevance | path

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

123

/linux/fs/ramfs/
A Dfile-nommu.c72 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()
139 if (unlikely(newsize >> 32)) in ramfs_nommu_resize()
142 return ramfs_nommu_expand_for_mapping(inode, newsize); in ramfs_nommu_resize()
146 if (newsize < size) { in ramfs_nommu_resize()
147 ret = nommu_shrink_inode_mappings(inode, size, newsize); in ramfs_nommu_resize()
[all …]
/linux/fs/bcachefs/
A Dkeylist.c11 size_t newsize = oldsize + new_u64s; in bch2_keylist_realloc() local
15 newsize = roundup_pow_of_two(newsize); in bch2_keylist_realloc()
17 if (newsize <= nr_inline_u64s || in bch2_keylist_realloc()
18 (old_buf && roundup_pow_of_two(oldsize) == newsize)) in bch2_keylist_realloc()
21 new_keys = krealloc(old_buf, sizeof(u64) * newsize, GFP_NOFS); in bch2_keylist_realloc()
/linux/drivers/acpi/x86/
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/mm/
A Dreadahead.c363 unsigned long newsize = roundup_pow_of_two(size); in get_init_ra_size() local
365 if (newsize <= max / 32) in get_init_ra_size()
366 newsize = newsize * 4; in get_init_ra_size()
367 else if (newsize <= max / 4) in get_init_ra_size()
368 newsize = newsize * 2; in get_init_ra_size()
370 newsize = max; in get_init_ra_size()
372 return newsize; in get_init_ra_size()
A Dtruncate.c712 void truncate_pagecache(struct inode *inode, loff_t newsize) in truncate_pagecache() argument
715 loff_t holebegin = round_up(newsize, PAGE_SIZE); in truncate_pagecache()
727 truncate_inode_pages(mapping, newsize); in truncate_pagecache()
745 void truncate_setsize(struct inode *inode, loff_t newsize) in truncate_setsize() argument
749 i_size_write(inode, newsize); in truncate_setsize()
750 if (newsize > oldsize) in truncate_setsize()
751 pagecache_isize_extended(inode, oldsize, newsize); in truncate_setsize()
752 truncate_pagecache(inode, newsize); in truncate_setsize()
/linux/include/linux/
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/scripts/dtc/
A Ddata.c27 unsigned int newsize; in data_grow_for() local
34 newsize = xlen; in data_grow_for()
36 while ((d.len + xlen) > newsize) in data_grow_for()
37 newsize *= 2; in data_grow_for()
39 nd.val = xrealloc(d.val, newsize); in data_grow_for()
/linux/fs/xfs/libxfs/
A Dxfs_dir2_sf.c926 int newsize; /* new inode size */ in xfs_dir2_sf_removename() local
961 newsize = oldsize - entsize; in xfs_dir2_sf_removename()
972 dp->i_disk_size = newsize; in xfs_dir2_sf_removename()
1002 int newsize; in xfs_dir2_sf_replace_needblock() local
1140 int newsize; /* new inode size */ in xfs_dir2_sf_toino4() local
1160 newsize = oldsize - (oldsfp->count + 1) * XFS_INO64_DIFF; in xfs_dir2_sf_toino4()
1162 xfs_idata_realloc(dp, newsize, XFS_DATA_FORK); in xfs_dir2_sf_toino4()
1194 dp->i_disk_size = newsize; in xfs_dir2_sf_toino4()
1212 int newsize; /* new inode size */ in xfs_dir2_sf_toino8() local
1234 xfs_idata_realloc(dp, newsize, XFS_DATA_FORK); in xfs_dir2_sf_toino8()
[all …]
/linux/fs/xfs/
A Dxfs_iops.c817 xfs_off_t oldsize, newsize; in xfs_setattr_size() local
830 newsize = iattr->ia_size; in xfs_setattr_size()
868 if (newsize > oldsize) { in xfs_setattr_size()
869 trace_xfs_zero_eof(ip, oldsize, newsize - oldsize); in xfs_setattr_size()
870 error = xfs_zero_range(ip, oldsize, newsize - oldsize, in xfs_setattr_size()
873 error = xfs_truncate_page(ip, newsize, &did_zeroing); in xfs_setattr_size()
900 truncate_setsize(inode, newsize); in xfs_setattr_size()
913 ip->i_disk_size, newsize - 1); in xfs_setattr_size()
946 if (newsize != oldsize && in xfs_setattr_size()
965 ip->i_disk_size = newsize; in xfs_setattr_size()
[all …]
/linux/fs/ceph/
A Dquota.c443 bool ceph_quota_is_max_bytes_exceeded(struct inode *inode, loff_t newsize) in ceph_quota_is_max_bytes_exceeded() argument
451 if (newsize <= size) in ceph_quota_is_max_bytes_exceeded()
454 return check_quota_exceeded(inode, QUOTA_CHECK_MAX_BYTES_OP, (newsize - size)); in ceph_quota_is_max_bytes_exceeded()
465 bool ceph_quota_is_max_bytes_approaching(struct inode *inode, loff_t newsize) in ceph_quota_is_max_bytes_approaching() argument
473 if (newsize <= size) in ceph_quota_is_max_bytes_approaching()
477 (newsize - size)); in ceph_quota_is_max_bytes_approaching()
/linux/scripts/dtc/libfdt/
A Dfdt_rw.c423 int newsize; in fdt_open_into() local
458 newsize = FDT_ALIGN(sizeof(struct fdt_header), 8) + mem_rsv_size in fdt_open_into()
461 if (bufsize < newsize) in fdt_open_into()
467 if (((tmp + newsize) > fdtstart) && (tmp < fdtend)) { in fdt_open_into()
470 if ((tmp + newsize) > ((char *)buf + bufsize)) in fdt_open_into()
476 memmove(buf, tmp, newsize); in fdt_open_into()
/linux/arch/s390/mm/
A Ddump_pagetables.c252 size_t oldsize, newsize; in add_marker() local
255 newsize = oldsize + 2 * sizeof(*markers); in add_marker()
257 markers = kvmalloc(newsize, GFP_KERNEL); in add_marker()
259 markers = kvrealloc(markers, newsize, GFP_KERNEL); in add_marker()
/linux/fs/jfs/
A Dinode.c367 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()
A Djfs_xtree.h108 extern s64 xtTruncate(tid_t tid, struct inode *ip, s64 newsize, int type);
/linux/arch/sh/mm/
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/
A Dbmap.c1326 while (oldsize != newsize) { in gfs2_journaled_truncate()
1330 chunk = oldsize - newsize; in gfs2_journaled_truncate()
1365 unsigned int offs = newsize & (blocksize - 1); in trunc_start()
1391 i_size_write(inode, newsize); in trunc_start()
1398 truncate_pagecache(inode, newsize); in trunc_start()
2028 error = trunc_start(inode, newsize); in do_shrink()
2034 error = punch_hole(ip, newsize, 0); in do_shrink()
2135 ret = inode_newsize_ok(inode, newsize); in gfs2_setattr_size()
2145 if (newsize >= inode->i_size) { in gfs2_setattr_size()
2146 ret = do_grow(inode, newsize); in gfs2_setattr_size()
[all …]
/linux/arch/s390/tools/
A Drelocs.c254 unsigned long newsize = r->size + 50000; in add_reloc() local
255 void *mem = realloc(r->offset, newsize * sizeof(r->offset[0])); in add_reloc()
258 die("realloc of %ld entries for relocs failed\n", newsize); in add_reloc()
261 r->size = newsize; in add_reloc()
/linux/fs/f2fs/
A Dxattr.c635 int found, newsize; in __f2fs_setxattr() local
712 newsize = XATTR_ALIGN(sizeof(struct f2fs_xattr_entry) + len + size); in __f2fs_setxattr()
725 if (unlikely(free < newsize)) { in __f2fs_setxattr()
760 new_hsize += newsize; in __f2fs_setxattr()
766 *(u32 *)((u8 *)last + newsize) = 0; in __f2fs_setxattr()
/linux/drivers/md/
A Dmd-cluster.h32 int (*resize_bitmaps)(struct mddev *mddev, sector_t newsize, sector_t oldsize);
/linux/fs/udf/
A Dinode.c696 (newsize & (sb->s_blocksize - 1)); in udf_extend_file()
1268 int udf_setsize(struct inode *inode, loff_t newsize) in udf_setsize() argument
1279 if (newsize > inode->i_size) { in udf_setsize()
1284 iinfo->i_lenAlloc = newsize; in udf_setsize()
1292 err = udf_extend_file(inode, newsize); in udf_setsize()
1296 truncate_setsize(inode, newsize); in udf_setsize()
1301 memset(iinfo->i_data + iinfo->i_lenEAttr + newsize, in udf_setsize()
1302 0x00, bsize - newsize - in udf_setsize()
1304 iinfo->i_lenAlloc = newsize; in udf_setsize()
1305 truncate_setsize(inode, newsize); in udf_setsize()
[all …]
/linux/fs/affs/
A Dfile.c558 affs_extent_file_ofs(struct inode *inode, u32 newsize) in affs_extent_file_ofs() argument
566 pr_debug("%s(%lu, %d)\n", __func__, inode->i_ino, newsize); in affs_extent_file_ofs()
576 tmp = min(bsize - boff, newsize - size); in affs_extent_file_ofs()
590 while (size < newsize) { in affs_extent_file_ofs()
595 tmp = min(bsize, newsize - size); in affs_extent_file_ofs()
620 inode->i_size = AFFS_I(inode)->mmu_private = newsize; in affs_extent_file_ofs()
624 inode->i_size = AFFS_I(inode)->mmu_private = newsize; in affs_extent_file_ofs()
/linux/drivers/block/rnbd/
A Drnbd-clt.h141 int rnbd_clt_resize_disk(struct rnbd_clt_dev *dev, sector_t newsize);
/linux/fs/nfs/
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()
/linux/fs/ntfs3/
A Dfile.c810 loff_t newsize, oldsize; in ntfs_setattr() local
819 newsize = attr->ia_size; in ntfs_setattr()
821 if (newsize <= oldsize) in ntfs_setattr()
822 err = ntfs_truncate(inode, newsize); in ntfs_setattr()
824 err = ntfs_extend(inode, newsize, 0, NULL); in ntfs_setattr()
830 i_size_write(inode, newsize); in ntfs_setattr()
/linux/drivers/md/bcache/
A Dbset.c138 size_t newsize = oldsize + u64s; in __bch_keylist_realloc() local
142 newsize = roundup_pow_of_two(newsize); in __bch_keylist_realloc()
144 if (newsize <= KEYLIST_INLINE || in __bch_keylist_realloc()
145 roundup_pow_of_two(oldsize) == newsize) in __bch_keylist_realloc()
148 new_keys = krealloc(old_keys, sizeof(uint64_t) * newsize, GFP_NOIO); in __bch_keylist_realloc()

Completed in 67 milliseconds

123