Home
last modified time | relevance | path

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

12

/fs/bcachefs/
A Dmean_and_variance.h53 static inline u128_u u128_shl(u128_u a, s8 shift) in u128_shl() argument
55 a.v <<= shift; in u128_shl()
110 static inline u128_u u128_shl(u128_u i, s8 shift) in u128_shl() argument
114 r.lo = i.lo << (shift & 63); in u128_shl()
115 if (shift < 64) in u128_shl()
116 r.hi = (i.hi << (shift & 63)) | (i.lo >> (-shift & 63)); in u128_shl()
118 r.hi = i.lo << (-shift & 63); in u128_shl()
A Deytzinger.h104 unsigned shift = __fls(size) - b; in __eytzinger1_to_inorder() local
112 i <<= shift; in __eytzinger1_to_inorder()
129 unsigned shift; in __inorder_to_eytzinger1() local
143 shift = __ffs(i); in __inorder_to_eytzinger1()
145 i >>= shift + 1; in __inorder_to_eytzinger1()
146 i |= 1U << (__fls(size) - shift); in __inorder_to_eytzinger1()
A Dio_misc.c394 s64 shift = dst_offset - src_offset; in __bch2_resume_logged_op_finsert() local
395 u64 len = abs(shift); in __bch2_resume_logged_op_finsert()
397 bool insert = shift > 0; in __bch2_resume_logged_op_finsert()
489 copy->k.p.offset += shift; in __bch2_resume_logged_op_finsert()
514 adjust_i_size(trans, inum, src_offset, shift, warn_errors) ?: in __bch2_resume_logged_op_finsert()
544 s64 shift = insert ? len : -len; in bch2_fcollapse_finsert() local
549 op.v.dst_offset = cpu_to_le64(offset + shift); in bch2_fcollapse_finsert()
A Dbset.c609 int shift, exponent, high_bit; in make_bfloat() local
641 shift = (int) (b->format.key_u64s * 64 - b->nr_key_bits) + exponent; in make_bfloat()
643 EBUG_ON(shift + BKEY_MANTISSA_BITS > b->format.key_u64s * 64); in make_bfloat()
645 shift = high_bit_offset + in make_bfloat()
650 EBUG_ON(shift < KEY_PACKED_BITS_START); in make_bfloat()
652 EBUG_ON(shift < 0 || shift >= BFLOAT_FAILED); in make_bfloat()
654 f->exponent = shift; in make_bfloat()
934 int shift = new_u64s - clobber_u64s; in bch2_bset_fix_lookup_table() local
964 rw_aux_tree(b, t)[idx].offset + shift == in bch2_bset_fix_lookup_table()
974 rw_aux_tree(b, t)[j].offset += shift; in bch2_bset_fix_lookup_table()
A Dinode.c49 unsigned bytes, shift; in inode_decode_field() local
62 shift = 8 - __fls(*in); /* 1 <= shift <= 8 */ in inode_decode_field()
63 bytes = byte_table[shift - 1]; in inode_decode_field()
70 *p ^= (1 << 8) >> shift; in inode_decode_field()
A Dbtree_io.c307 unsigned i, u64s = 0, bytes, shift = end_idx - start_idx - 1; in btree_node_sort() local
370 b->nsets -= shift; in btree_node_sort()
373 b->nr.bset_u64s[i] = b->nr.bset_u64s[i + shift]; in btree_node_sort()
374 b->set[i] = b->set[i + shift]; in btree_node_sort()
689 unsigned shift = (u64 *) k - (u64 *) i->start; in bch2_btree_node_drop_keys_outside_node() local
693 i->u64s = cpu_to_le16(le16_to_cpu(i->u64s) - shift); in bch2_btree_node_drop_keys_outside_node()
A Dfs.c2273 unsigned shift = sb->s_blocksize_bits - 9; in bch2_statfs() local
2282 buf->f_blocks = usage.capacity >> shift; in bch2_statfs()
2283 buf->f_bfree = usage.free >> shift; in bch2_statfs()
2284 buf->f_bavail = avail_factor(usage.free) >> shift; in bch2_statfs()
/fs/gfs2/
A Dmeta_io.c132 unsigned int shift; in gfs2_getbuf() local
139 shift = PAGE_SHIFT - sdp->sd_sb.sb_bsize_shift; in gfs2_getbuf()
140 index = blkno >> shift; /* convert block to page */ in gfs2_getbuf()
141 bufnum = blkno - (index << shift); /* block buf index within page */ in gfs2_getbuf()
419 unsigned int shift = PAGE_SHIFT - sdp->sd_sb.sb_bsize_shift; in gfs2_getjdatabuf() local
420 unsigned long index = blkno >> shift; /* convert block to page */ in gfs2_getjdatabuf()
421 unsigned int bufnum = blkno - (index << shift); in gfs2_getjdatabuf()
A Dbmap.c2254 unsigned int shift = sdp->sd_sb.sb_bsize_shift; in gfs2_map_journal_extents() local
2260 lblock_stop = i_size_read(jd->jd_inode) >> shift; in gfs2_map_journal_extents()
2261 size = (lblock_stop - lblock) << shift; in gfs2_map_journal_extents()
2272 rc = gfs2_add_jextent(jd, lblock, bh.b_blocknr, bh.b_size >> shift); in gfs2_map_journal_extents()
2310 unsigned int shift; in gfs2_write_alloc_required() local
2323 shift = sdp->sd_sb.sb_bsize_shift; in gfs2_write_alloc_required()
2325 end_of_file = (i_size_read(&ip->i_inode) + sdp->sd_sb.sb_bsize - 1) >> shift; in gfs2_write_alloc_required()
2326 lblock = offset >> shift; in gfs2_write_alloc_required()
2327 lblock_stop = (offset + len + sdp->sd_sb.sb_bsize - 1) >> shift; in gfs2_write_alloc_required()
2331 size = (lblock_stop - lblock) << shift; in gfs2_write_alloc_required()
A Dlops.c512 unsigned int shift = PAGE_SHIFT - bsize_shift; in gfs2_find_jhead() local
532 block >> shift); in gfs2_find_jhead()
576 gfs2_jhead_process_page(jd, blocks_read >> shift, head, &done); in gfs2_find_jhead()
587 gfs2_jhead_process_page(jd, blocks_read >> shift, head, &done); in gfs2_find_jhead()
/fs/adfs/
A Dadfs.h191 static inline __u32 signed_asl(__u32 val, signed int shift) in signed_asl() argument
193 if (shift >= 0) in signed_asl()
194 val <<= shift; in signed_asl()
196 val >>= -shift; in signed_asl()
/fs/xfs/
A Dxfs_iomap.c419 shift = 2; in xfs_quota_calc_throttle()
421 shift += 2; in xfs_quota_calc_throttle()
423 shift += 2; in xfs_quota_calc_throttle()
441 int *shift) in xfs_iomap_freesp() argument
447 *shift = 2; in xfs_iomap_freesp()
449 (*shift)++; in xfs_iomap_freesp()
451 (*shift)++; in xfs_iomap_freesp()
453 (*shift)++; in xfs_iomap_freesp()
548 &shift); in xfs_iomap_prealloc_size()
572 shift = max(shift, qshift); in xfs_iomap_prealloc_size()
[all …]
/fs/btrfs/
A Dcompression.c1294 static u8 get4bits(u64 num, int shift) { in get4bits() argument
1297 num >>= shift; in get4bits()
1321 int shift; in radix_sort() local
1338 shift = 0; in radix_sort()
1339 while (shift < bitlen) { in radix_sort()
1344 addr = get4bits(buf_num, shift); in radix_sort()
1353 addr = get4bits(buf_num, shift); in radix_sort()
1359 shift += RADIX_BASE; in radix_sort()
1371 addr = get4bits(buf_num, shift); in radix_sort()
1380 addr = get4bits(buf_num, shift); in radix_sort()
[all …]
A Dzoned.c165 static inline u32 sb_zone_number(int shift, int mirror) in sb_zone_number() argument
172 case 1: zone = 1ULL << (BTRFS_SB_LOG_FIRST_SHIFT - shift); break; in sb_zone_number()
173 case 2: zone = 1ULL << (BTRFS_SB_LOG_SECOND_SHIFT - shift); break; in sb_zone_number()
1045 const u8 shift = zinfo->zone_size_shift; in btrfs_find_allocatable_zones() local
1046 u64 nzones = num_bytes >> shift; in btrfs_find_allocatable_zones()
1056 begin = pos >> shift; in btrfs_find_allocatable_zones()
1074 sb_zone = sb_zone_number(shift, i); in btrfs_find_allocatable_zones()
1163 const u8 shift = zinfo->zone_size_shift; in btrfs_ensure_empty_zones() local
1164 unsigned long begin = start >> shift; in btrfs_ensure_empty_zones()
1165 unsigned long nbits = size >> shift; in btrfs_ensure_empty_zones()
[all …]
/fs/jbd2/
A Drevoke.c220 int shift = 0; in jbd2_journal_init_revoke_table() local
229 shift++; in jbd2_journal_init_revoke_table()
232 table->hash_shift = shift; in jbd2_journal_init_revoke_table()
/fs/nls/
A Dnls_base.c31 int shift; member
103 c = t->shift; in utf32_to_utf8()
/fs/ufs/
A Dinode.c131 int shift = uspi->s_apbshift-uspi->s_fpbshift; in ufs_frag_map() local
160 fs32_to_cpu(sb, q->key32) + (n>>shift)); in ufs_frag_map()
184 fs64_to_cpu(sb, q->key64) + (n>>shift)); in ufs_frag_map()
319 int shift = uspi->s_apbshift - uspi->s_fpbshift; in ufs_inode_getblock() local
327 bh = sb_bread(sb, ind_block + (index >> shift)); in ufs_inode_getblock()
/fs/squashfs/
A Dfile.c570 unsigned short shift = msblk->block_log - PAGE_SHIFT; in squashfs_readahead() local
578 unsigned int max_pages = 1UL << shift; in squashfs_readahead()
/fs/zonefs/
A Dsuper.c594 long fno = 0, shift = 1; in zonefs_fname_to_fno() local
616 fno += (c - '0') * shift; in zonefs_fname_to_fno()
617 shift *= 10; in zonefs_fname_to_fno()
/fs/xfs/libxfs/
A Dxfs_bmap.h220 xfs_fileoff_t shift);
A Dxfs_bmap.c5504 xfs_fileoff_t shift) /* shift fsb */ in xfs_bmse_can_merge() argument
5508 startoff = got->br_startoff - shift; in xfs_bmse_can_merge()
5538 xfs_fileoff_t shift, /* shift fsb */ in xfs_bmse_merge() argument
5554 ASSERT(xfs_bmse_can_merge(ip, whichfork, left, got, shift)); in xfs_bmse_merge()
5757 xfs_fileoff_t shift) in xfs_bmap_can_insert_extents() argument
5771 ((got.br_startoff + shift) & BMBT_STARTOFF_MASK) < got.br_startoff) in xfs_bmap_can_insert_extents()
/fs/ntfs3/
A Dattrib.c189 u8 shift = sbi->cluster_bits - SECTOR_SHIFT; in attr_allocate_clusters() local
192 (sector_t)lcn << shift, in attr_allocate_clusters()
193 (sector_t)flen << shift, in attr_allocate_clusters()
257 u8 shift = sbi->cluster_bits + NTFS_LZNT_CUNIT; in attr_make_nonresident() local
258 len = ((rsize + (1u << shift) - 1) >> shift) << NTFS_LZNT_CUNIT; in attr_make_nonresident()
/fs/ext4/
A Dextents.c5193 ext4_ext_shift_path_extents(struct ext4_ext_path *path, ext4_lblk_t shift, in ext4_ext_shift_path_extents() argument
5234 -shift); in ext4_ext_shift_path_extents()
5245 le32_add_cpu(&ex_last->ee_block, shift); in ext4_ext_shift_path_extents()
5265 le32_add_cpu(&path[depth].p_idx->ei_block, -shift); in ext4_ext_shift_path_extents()
5267 le32_add_cpu(&path[depth].p_idx->ei_block, shift); in ext4_ext_shift_path_extents()
5292 ext4_lblk_t start, ext4_lblk_t shift, in ext4_ext_shift_extents() argument
5335 if ((start == ex_start && shift > ex_start) || in ext4_ext_shift_extents()
5336 (shift > start - ex_end)) { in ext4_ext_shift_extents()
5341 if (shift > EXT_MAX_BLOCKS - in ext4_ext_shift_extents()
5415 ret = ext4_ext_shift_path_extents(path, shift, inode, in ext4_ext_shift_extents()
/fs/ocfs2/
A Dalloc.c1533 int ret, shift; in ocfs2_grow_tree() local
1540 shift = ocfs2_find_branch_target(et, &bh); in ocfs2_grow_tree()
1541 if (shift < 0) { in ocfs2_grow_tree()
1542 ret = shift; in ocfs2_grow_tree()
1550 if (shift) { in ocfs2_grow_tree()
/fs/f2fs/
A Dsegment.c38 int shift = 24, idx = 0; in __reverse_ulong() local
41 shift = 56; in __reverse_ulong()
43 while (shift >= 0) { in __reverse_ulong()
44 tmp |= (unsigned long)str[idx++] << shift; in __reverse_ulong()
45 shift -= BITS_PER_BYTE; in __reverse_ulong()

Completed in 101 milliseconds

12