Home
last modified time | relevance | path

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

1234567

/linux-6.6.21/rust/alloc/
Dalloc.rs36 fn __rust_realloc(ptr: *mut u8, old_size: usize, align: usize, new_size: usize) -> *mut u8; in __rust_realloc()
137 pub unsafe fn realloc(ptr: *mut u8, layout: Layout, new_size: usize) -> *mut u8 { in realloc()
138 unsafe { __rust_realloc(ptr, layout.size(), layout.align(), new_size) } in realloc()
210 let new_size = new_layout.size(); in grow_impl() localVariable
213 intrinsics::assume(new_size >= old_layout.size()); in grow_impl()
215 let raw_ptr = realloc(ptr.as_ptr(), old_layout, new_size); in grow_impl()
218 raw_ptr.add(old_size).write_bytes(0, new_size - old_size); in grow_impl()
220 Ok(NonNull::slice_from_raw_parts(ptr, new_size)) in grow_impl()
302 new_size if old_layout.align() == new_layout.align() => unsafe { in shrink()
304 intrinsics::assume(new_size <= old_layout.size()); in shrink()
[all …]
/linux-6.6.21/fs/xfs/libxfs/
Dxfs_inode_fork.c381 size_t new_size; in xfs_iroot_realloc() local
399 new_size = XFS_BMAP_BROOT_SPACE_CALC(mp, rec_diff); in xfs_iroot_realloc()
400 ifp->if_broot = kmem_alloc(new_size, KM_NOFS); in xfs_iroot_realloc()
401 ifp->if_broot_bytes = (int)new_size; in xfs_iroot_realloc()
413 new_size = XFS_BMAP_BROOT_SPACE_CALC(mp, new_max); in xfs_iroot_realloc()
414 ifp->if_broot = krealloc(ifp->if_broot, new_size, in xfs_iroot_realloc()
419 (int)new_size); in xfs_iroot_realloc()
420 ifp->if_broot_bytes = (int)new_size; in xfs_iroot_realloc()
437 new_size = XFS_BMAP_BROOT_SPACE_CALC(mp, new_max); in xfs_iroot_realloc()
439 new_size = 0; in xfs_iroot_realloc()
[all …]
/linux-6.6.21/fs/reiserfs/
Dobjectid.c183 int new_size = (s->s_blocksize - SB_SIZE) / sizeof(__u32) / 2 * 2; in reiserfs_convert_objectid_map_v1() local
193 if (cur_size > new_size) { in reiserfs_convert_objectid_map_v1()
198 objectid_map[new_size - 1] = objectid_map[cur_size - 1]; in reiserfs_convert_objectid_map_v1()
199 set_sb_oid_cursize(disk_sb, new_size); in reiserfs_convert_objectid_map_v1()
202 for (i = new_size - 1; i >= 0; i--) { in reiserfs_convert_objectid_map_v1()
203 objectid_map[i + (old_max - new_size)] = objectid_map[i]; in reiserfs_convert_objectid_map_v1()
207 set_sb_oid_maxsize(disk_sb, new_size); in reiserfs_convert_objectid_map_v1()
/linux-6.6.21/scripts/kconfig/
Dlexer.l57 int new_size = text_size + size + 1; in append_string() local
58 if (new_size > text_asize) { in append_string()
59 new_size += START_STRSIZE - 1; in append_string()
60 new_size &= -START_STRSIZE; in append_string()
61 text = xrealloc(text, new_size); in append_string()
62 text_asize = new_size; in append_string()
/linux-6.6.21/drivers/staging/most/dim2/
Ddim2.c452 u16 new_size; in configure_channel() local
471 new_size = dim_norm_ctrl_async_buffer_size(buf_size); in configure_channel()
472 if (new_size == 0) { in configure_channel()
476 ccfg->buffer_size = new_size; in configure_channel()
477 if (new_size != buf_size) in configure_channel()
479 hdm_ch->name, buf_size, new_size); in configure_channel()
482 is_tx ? new_size * 2 : new_size); in configure_channel()
485 new_size = dim_norm_ctrl_async_buffer_size(buf_size); in configure_channel()
486 if (new_size == 0) { in configure_channel()
490 ccfg->buffer_size = new_size; in configure_channel()
[all …]
/linux-6.6.21/fs/cachefiles/
Dinterface.c228 struct file *file, loff_t new_size) in cachefiles_shorten_object() argument
235 dio_size = round_up(new_size, CACHEFILES_DIO_BLOCK_SIZE); in cachefiles_shorten_object()
251 if (new_size < dio_size) { in cachefiles_shorten_object()
252 trace_cachefiles_trunc(object, inode, dio_size, new_size, in cachefiles_shorten_object()
257 new_size, dio_size - new_size); in cachefiles_shorten_object()
274 loff_t new_size) in cachefiles_resize_cookie() argument
283 _enter("%llu->%llu", old_size, new_size); in cachefiles_resize_cookie()
285 if (new_size < old_size) { in cachefiles_resize_cookie()
287 cachefiles_shorten_object(object, file, new_size); in cachefiles_resize_cookie()
289 object->cookie->object_size = new_size; in cachefiles_resize_cookie()
[all …]
/linux-6.6.21/include/trace/events/
Dfscache.h459 TP_PROTO(struct fscache_cookie *cookie, loff_t new_size),
461 TP_ARGS(cookie, new_size),
465 __field(loff_t, new_size )
470 __entry->new_size = new_size;
474 __entry->cookie, __entry->new_size)
478 TP_PROTO(struct fscache_cookie *cookie, loff_t new_size),
480 TP_ARGS(cookie, new_size),
485 __field(loff_t, new_size )
491 __entry->new_size = new_size;
497 __entry->new_size)
/linux-6.6.21/kernel/module/
Ddecompress.c89 size_t new_size = 0; in module_gzip_decompress() local
127 new_size += PAGE_SIZE - s.avail_out; in module_gzip_decompress()
136 retval = new_size; in module_gzip_decompress()
156 size_t new_size = 0; in module_xz_decompress() local
187 new_size += xz_buf.out_pos; in module_xz_decompress()
196 retval = new_size; in module_xz_decompress()
218 size_t new_size = 0; in module_zstd_decompress() local
275 new_size += zstd_dec.pos; in module_zstd_decompress()
284 retval = new_size; in module_zstd_decompress()
/linux-6.6.21/arch/sparc/mm/
Dtsb.c370 static unsigned long tsb_size_to_rss_limit(unsigned long new_size) in tsb_size_to_rss_limit() argument
372 unsigned long num_ents = (new_size / sizeof(struct tsb)); in tsb_size_to_rss_limit()
399 unsigned long new_size, old_size, flags; in tsb_grow() local
409 for (new_size = 8192; new_size < max_tsb_size; new_size <<= 1UL) { in tsb_grow()
410 new_rss_limit = tsb_size_to_rss_limit(new_size); in tsb_grow()
416 if (new_size == max_tsb_size) in tsb_grow()
421 if (new_size > (PAGE_SIZE * 2)) in tsb_grow()
435 new_size = 8192; in tsb_grow()
449 tsb_init(new_tsb, new_size); in tsb_grow()
509 copy_tsb(old_tsb_base, old_size, new_tsb_base, new_size, in tsb_grow()
[all …]
/linux-6.6.21/tools/bootconfig/
Dtest-bootconfig.sh57 new_size=$(stat -c %s $INITRD)
66 xpass test $new_size -eq $total_size
72 xpass test $new_size -eq $(stat -c %s $INITRD)
78 new_size=$(stat -c %s $INITRD)
79 xpass test $new_size -eq $initrd_size
/linux-6.6.21/drivers/gpu/drm/i915/
Di915_deps.c81 unsigned int new_size = 2 * deps->fences_size; in i915_deps_grow() local
84 new_size = max(new_size, I915_DEPS_MIN_ALLOC_CHUNK); in i915_deps_grow()
85 new_fences = kmalloc_array(new_size, sizeof(*new_fences), deps->gfp); in i915_deps_grow()
94 deps->fences_size = new_size; in i915_deps_grow()
/linux-6.6.21/fs/jfs/
Dxattr.c593 int new_size) in ea_put() argument
599 if (new_size == 0) { in ea_put()
603 assert(new_size <= sizeof (ji->i_inline_ea)); in ea_put()
606 DXDsize(&ea_buf->new_ea, new_size); in ea_put()
610 rc = ea_write(inode, ea_buf->xattr, new_size, &ea_buf->new_ea); in ea_put()
617 rc = ea_write(inode, ea_buf->xattr, new_size, &ea_buf->new_ea); in ea_put()
663 int new_size; in __jfs_setxattr() local
679 new_size = sizeof (struct jfs_ea_list); in __jfs_setxattr()
695 new_size += EA_SIZE(ea); in __jfs_setxattr()
710 new_size += sizeof (struct jfs_ea) + namelen + 1 + value_len; in __jfs_setxattr()
[all …]
Dnamei.c472 s64 new_size = 0; in jfs_unlink() local
527 if ((new_size = commitZeroLink(tid, ip)) < 0) { in jfs_unlink()
533 rc = new_size; in jfs_unlink()
546 if (new_size) in jfs_unlink()
562 while (new_size && (rc == 0)) { in jfs_unlink()
565 new_size = xtTruncate_pmap(tid, ip, new_size); in jfs_unlink()
566 if (new_size < 0) { in jfs_unlink()
568 rc = new_size; in jfs_unlink()
1085 s64 new_size = 0; in jfs_rename() local
1199 if ((new_size = commitZeroLink(tid, new_ip)) < 0) { in jfs_rename()
[all …]
/linux-6.6.21/fs/btrfs/
Dinode-item.c469 u64 new_size = control->new_size; in btrfs_truncate_inode_items() local
483 ASSERT(new_size == 0 || control->min_type == BTRFS_EXTENT_DATA_KEY); in btrfs_truncate_inode_items()
485 control->last_size = new_size; in btrfs_truncate_inode_items()
562 if (item_end < new_size) in btrfs_truncate_inode_items()
564 if (found_key.offset >= new_size) in btrfs_truncate_inode_items()
584 extent_num_bytes = ALIGN(new_size - in btrfs_truncate_inode_items()
587 clear_start = ALIGN(new_size, fs_info->sectorsize); in btrfs_truncate_inode_items()
616 u32 size = (u32)(new_size - found_key.offset); in btrfs_truncate_inode_items()
637 control->sub_bytes += item_end + 1 - new_size; in btrfs_truncate_inode_items()
669 control->last_size = new_size; in btrfs_truncate_inode_items()
[all …]
/linux-6.6.21/drivers/hid/
Dhid-gembird.c67 size_t new_size = *rsize + delta_size; in gembird_report_fixup() local
72 new_rdesc = devm_kzalloc(&hdev->dev, new_size, GFP_KERNEL); in gembird_report_fixup()
90 *rsize = new_size; in gembird_report_fixup()
/linux-6.6.21/arch/s390/appldata/
Dappldata_os.c96 unsigned int new_size; in appldata_get_os_data() local
132 new_size = struct_size(os_data, os_cpu, os_data->nr_cpus); in appldata_get_os_data()
133 if (ops.size != new_size) { in appldata_get_os_data()
137 (unsigned long) ops.data, new_size, in appldata_get_os_data()
151 ops.size = new_size; in appldata_get_os_data()
/linux-6.6.21/fs/xfs/
Dxfs_inode.h191 xfs_new_eof(struct xfs_inode *ip, xfs_fsize_t new_size) in xfs_new_eof() argument
195 if (new_size > i_size || new_size < 0) in xfs_new_eof()
196 new_size = i_size; in xfs_new_eof()
197 return new_size > ip->i_disk_size ? new_size : 0; in xfs_new_eof()
557 xfs_fsize_t new_size) in xfs_itruncate_extents() argument
559 return xfs_itruncate_extents_flags(tpp, ip, whichfork, new_size, 0); in xfs_itruncate_extents()
/linux-6.6.21/fs/ubifs/
Dreplay.c58 loff_t new_size; member
187 min_blk = r->new_size / UBIFS_BLOCK_SIZE; in trun_remove_range()
188 if (r->new_size & (UBIFS_BLOCK_SIZE - 1)) in trun_remove_range()
286 r->new_size); in apply_replay_entry()
386 loff_t old_size, loff_t new_size) in insert_node() argument
409 r->new_size = new_size; in insert_node()
741 loff_t new_size = le64_to_cpu(ino->size); in replay_bud() local
747 &used, 0, new_size); in replay_bud()
753 loff_t new_size = le32_to_cpu(dn->size) + in replay_bud() local
759 &used, 0, new_size); in replay_bud()
[all …]
/linux-6.6.21/drivers/platform/x86/dell/dell-wmi-sysman/
Dpasswordattr-interface.c43 size_t password_type_size, current_password_size, new_size; in set_new_password() local
69 new_size = calculate_string_buffer(new); in set_new_password()
70 buffer_size = security_area_size + password_type_size + current_password_size + new_size; in set_new_password()
92 ret = populate_string_buffer(start, new_size, new); in set_new_password()
/linux-6.6.21/drivers/gpu/drm/vmwgfx/
Dvmwgfx_cotable.c399 static int vmw_cotable_resize(struct vmw_resource *res, size_t new_size) in vmw_cotable_resize() argument
416 .size = new_size, in vmw_cotable_resize()
486 res->guest_memory_size = new_size; in vmw_cotable_resize()
547 size_t new_size = res->guest_memory_size; in vmw_cotable_create() local
553 while (needed_size > new_size) in vmw_cotable_create()
554 new_size *= 2; in vmw_cotable_create()
556 if (likely(new_size <= res->guest_memory_size)) { in vmw_cotable_create()
566 return vmw_cotable_resize(res, new_size); in vmw_cotable_create()
/linux-6.6.21/fs/ntfs3/
Dfile.c369 static int ntfs_truncate(struct inode *inode, loff_t new_size) in ntfs_truncate() argument
380 if (ni->i_valid > new_size) in ntfs_truncate()
381 ni->i_valid = new_size; in ntfs_truncate()
383 err = block_truncate_page(inode->i_mapping, new_size, in ntfs_truncate()
389 new_valid = ntfs_up_block(sb, min_t(u64, ni->i_valid, new_size)); in ntfs_truncate()
391 truncate_setsize(inode, new_size); in ntfs_truncate()
396 err = attr_set_size(ni, ATTR_DATA, NULL, 0, &ni->file.run, new_size, in ntfs_truncate()
443 loff_t i_size, new_size; in ntfs_fallocate() local
474 new_size = max(end, i_size); in ntfs_fallocate()
561 err = inode_newsize_ok(inode, new_size); in ntfs_fallocate()
[all …]
Dattrlist.c296 u64 new_size; in al_add_le() local
304 new_size = old_size + sz; in al_add_le()
306 new_asize = al_aligned(new_size); in al_add_le()
312 if (new_size > asize) { in al_add_le()
328 al->size = new_size; in al_add_le()
339 err = attr_set_size(ni, ATTR_LIST, NULL, 0, &al->run, new_size, in al_add_le()
340 &new_size, true, &attr); in al_add_le()
/linux-6.6.21/kernel/
Dkexec_core.c1117 unsigned long new_size) in __crash_shrink_memory() argument
1125 ram_res->start = old_res->start + new_size; in __crash_shrink_memory()
1130 if (!new_size) { in __crash_shrink_memory()
1144 int crash_shrink_memory(unsigned long new_size) in crash_shrink_memory() argument
1159 new_size = roundup(new_size, KEXEC_CRASH_MEM_ALIGN); in crash_shrink_memory()
1160 if (new_size >= old_size) { in crash_shrink_memory()
1161 ret = (new_size == old_size) ? 0 : -EINVAL; in crash_shrink_memory()
1173 if (low_size > new_size) { in crash_shrink_memory()
1178 ret = __crash_shrink_memory(&crashk_low_res, new_size); in crash_shrink_memory()
1180 ret = __crash_shrink_memory(&crashk_res, new_size - low_size); in crash_shrink_memory()
/linux-6.6.21/drivers/comedi/
Dcomedi_buf.c257 unsigned long new_size) in comedi_buf_alloc() argument
264 new_size = (new_size + PAGE_SIZE - 1) & PAGE_MASK; in comedi_buf_alloc()
267 if (async->prealloc_buf && async->prealloc_bufsz == new_size) in comedi_buf_alloc()
274 if (new_size) { in comedi_buf_alloc()
275 unsigned int n_pages = new_size >> PAGE_SHIFT; in comedi_buf_alloc()
285 async->prealloc_bufsz = new_size; in comedi_buf_alloc()
/linux-6.6.21/drivers/scsi/cxlflash/
Dvlun.c505 u64 *new_size) in grow_lxt() argument
516 u64 delta = *new_size - rhte->lxt_cnt; in grow_lxt()
601 *new_size = my_new_size; in grow_lxt()
623 u64 *new_size) in shrink_lxt() argument
636 u64 delta = rhte->lxt_cnt - *new_size; in shrink_lxt()
709 *new_size = my_new_size; in shrink_lxt()
741 u64 new_size; in _cxlflash_vlun_resize() local
755 new_size = DIV_ROUND_UP(nsectors, MC_CHUNK_SIZE); in _cxlflash_vlun_resize()
759 new_size); in _cxlflash_vlun_resize()
789 if (new_size > rhte->lxt_cnt) in _cxlflash_vlun_resize()
[all …]

1234567