Lines Matching refs:sbi

64 	struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb);  in ext4_extent_block_csum()  local
67 csum = ext4_chksum(sbi, ei->i_csum_seed, (__u8 *)eh, in ext4_extent_block_csum()
1876 static unsigned int ext4_ext_check_overlap(struct ext4_sb_info *sbi, in ext4_ext_check_overlap() argument
1890 b2 = EXT4_LBLK_CMASK(sbi, le32_to_cpu(path[depth].p_ext->ee_block)); in ext4_ext_check_overlap()
1900 b2 = EXT4_LBLK_CMASK(sbi, b2); in ext4_ext_check_overlap()
2481 struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); in ext4_remove_blocks() local
2503 *partial_cluster != (long long) EXT4_B2C(sbi, pblk)) { in ext4_remove_blocks()
2505 EXT4_C2B(sbi, *partial_cluster), in ext4_remove_blocks()
2506 sbi->s_cluster_ratio, flags); in ext4_remove_blocks()
2512 struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); in ext4_remove_blocks() local
2513 spin_lock(&sbi->s_ext_stats_lock); in ext4_remove_blocks()
2514 sbi->s_ext_blocks += ee_len; in ext4_remove_blocks()
2515 sbi->s_ext_extents++; in ext4_remove_blocks()
2516 if (ee_len < sbi->s_ext_min) in ext4_remove_blocks()
2517 sbi->s_ext_min = ee_len; in ext4_remove_blocks()
2518 if (ee_len > sbi->s_ext_max) in ext4_remove_blocks()
2519 sbi->s_ext_max = ee_len; in ext4_remove_blocks()
2520 if (ext_depth(inode) > sbi->s_depth_max) in ext4_remove_blocks()
2521 sbi->s_depth_max = ext_depth(inode); in ext4_remove_blocks()
2522 spin_unlock(&sbi->s_ext_stats_lock); in ext4_remove_blocks()
2539 *partial_cluster == -(long long) EXT4_B2C(sbi, pblk+num-1)) in ext4_remove_blocks()
2561 if (EXT4_PBLK_COFF(sbi, pblk) && ee_len == num) { in ext4_remove_blocks()
2562 first_cluster = (long long) EXT4_B2C(sbi, pblk); in ext4_remove_blocks()
2569 ext4_error(sbi->s_sb, "strange request: removal(2) " in ext4_remove_blocks()
2597 struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); in ext4_ext_rm_leaf() local
2655 if (sbi->s_cluster_ratio > 1) { in ext4_ext_rm_leaf()
2658 -(long long) EXT4_B2C(sbi, pblk); in ext4_ext_rm_leaf()
2760 if (*partial_cluster != (long long) EXT4_B2C(sbi, pblk)) { in ext4_ext_rm_leaf()
2762 EXT4_C2B(sbi, *partial_cluster), in ext4_ext_rm_leaf()
2763 sbi->s_cluster_ratio, in ext4_ext_rm_leaf()
2802 struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); in ext4_ext_remove_space() local
2866 if (sbi->s_cluster_ratio > 1) { in ext4_ext_remove_space()
2869 -(long long) EXT4_B2C(sbi, pblk); in ext4_ext_remove_space()
2883 } else if (sbi->s_cluster_ratio > 1 && end >= ex_end) { in ext4_ext_remove_space()
2899 -(long long) EXT4_B2C(sbi, pblk); in ext4_ext_remove_space()
3019 EXT4_C2B(sbi, partial_cluster), in ext4_ext_remove_space()
3020 sbi->s_cluster_ratio, in ext4_ext_remove_space()
3090 struct ext4_sb_info *sbi = EXT4_SB(sb); in ext4_ext_release() local
3092 sbi->s_ext_blocks, sbi->s_ext_extents, in ext4_ext_release()
3093 sbi->s_ext_blocks / sbi->s_ext_extents); in ext4_ext_release()
3095 sbi->s_ext_min, sbi->s_ext_max, sbi->s_depth_max); in ext4_ext_release()
3399 struct ext4_sb_info *sbi; in ext4_ext_convert_to_initialized() local
3414 sbi = EXT4_SB(inode->i_sb); in ext4_ext_convert_to_initialized()
3559 max_zeroout = sbi->s_extent_max_zeroout_kb >> in ext4_ext_convert_to_initialized()
3852 struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); in ext4_find_delalloc_cluster() local
3854 lblk_start = EXT4_LBLK_CMASK(sbi, lblk); in ext4_find_delalloc_cluster()
3855 lblk_end = lblk_start + sbi->s_cluster_ratio - 1; in ext4_find_delalloc_cluster()
3899 struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); in get_reserved_cluster_alloc() local
3904 alloc_cluster_start = EXT4_B2C(sbi, lblk_start); in get_reserved_cluster_alloc()
3905 alloc_cluster_end = EXT4_B2C(sbi, lblk_start + num_blks - 1); in get_reserved_cluster_alloc()
3913 c_offset = EXT4_LBLK_COFF(sbi, lblk_start); in get_reserved_cluster_alloc()
3915 lblk_from = EXT4_LBLK_CMASK(sbi, lblk_start); in get_reserved_cluster_alloc()
3923 c_offset = EXT4_LBLK_COFF(sbi, lblk_start + num_blks); in get_reserved_cluster_alloc()
3926 lblk_to = lblk_from + (sbi->s_cluster_ratio - c_offset) - 1; in get_reserved_cluster_alloc()
4200 struct ext4_sb_info *sbi = EXT4_SB(sb); in get_implied_cluster_alloc() local
4201 ext4_lblk_t c_offset = EXT4_LBLK_COFF(sbi, map->m_lblk); in get_implied_cluster_alloc()
4209 ex_cluster_start = EXT4_B2C(sbi, ee_block); in get_implied_cluster_alloc()
4210 ex_cluster_end = EXT4_B2C(sbi, ee_block + ee_len - 1); in get_implied_cluster_alloc()
4213 rr_cluster_start = EXT4_B2C(sbi, map->m_lblk); in get_implied_cluster_alloc()
4219 map->m_pblk = EXT4_PBLK_CMASK(sbi, ee_start) + c_offset; in get_implied_cluster_alloc()
4221 (unsigned) sbi->s_cluster_ratio - c_offset); in get_implied_cluster_alloc()
4280 struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); in ext4_ext_map_blocks() local
4383 cluster_offset = EXT4_LBLK_COFF(sbi, map->m_lblk); in ext4_ext_map_blocks()
4410 if ((sbi->s_cluster_ratio > 1) && ex2 && in ext4_ext_map_blocks()
4433 err = ext4_ext_check_overlap(sbi, inode, &newex, path); in ext4_ext_map_blocks()
4451 offset = EXT4_LBLK_COFF(sbi, map->m_lblk); in ext4_ext_map_blocks()
4452 ar.len = EXT4_NUM_B2C(sbi, offset+allocated); in ext4_ext_map_blocks()
4473 ar.len = EXT4_C2B(sbi, ar.len) - offset; in ext4_ext_map_blocks()
4520 EXT4_C2B(sbi, allocated_clusters), fb_flags); in ext4_ext_map_blocks()
4589 EXT4_C2B(sbi, reservation)); in ext4_ext_map_blocks()