Lines Matching refs:sbi
63 struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); in ext4_extent_block_csum() local
66 csum = ext4_chksum(sbi, ei->i_csum_seed, (__u8 *)eh, in ext4_extent_block_csum()
1874 static unsigned int ext4_ext_check_overlap(struct ext4_sb_info *sbi, in ext4_ext_check_overlap() argument
1888 b2 = EXT4_LBLK_CMASK(sbi, le32_to_cpu(path[depth].p_ext->ee_block)); in ext4_ext_check_overlap()
1898 b2 = EXT4_LBLK_CMASK(sbi, b2); in ext4_ext_check_overlap()
2479 struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); in ext4_remove_blocks() local
2501 *partial_cluster != (long long) EXT4_B2C(sbi, pblk)) { in ext4_remove_blocks()
2503 EXT4_C2B(sbi, *partial_cluster), in ext4_remove_blocks()
2504 sbi->s_cluster_ratio, flags); in ext4_remove_blocks()
2510 struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); in ext4_remove_blocks() local
2511 spin_lock(&sbi->s_ext_stats_lock); in ext4_remove_blocks()
2512 sbi->s_ext_blocks += ee_len; in ext4_remove_blocks()
2513 sbi->s_ext_extents++; in ext4_remove_blocks()
2514 if (ee_len < sbi->s_ext_min) in ext4_remove_blocks()
2515 sbi->s_ext_min = ee_len; in ext4_remove_blocks()
2516 if (ee_len > sbi->s_ext_max) in ext4_remove_blocks()
2517 sbi->s_ext_max = ee_len; in ext4_remove_blocks()
2518 if (ext_depth(inode) > sbi->s_depth_max) in ext4_remove_blocks()
2519 sbi->s_depth_max = ext_depth(inode); in ext4_remove_blocks()
2520 spin_unlock(&sbi->s_ext_stats_lock); in ext4_remove_blocks()
2537 *partial_cluster == -(long long) EXT4_B2C(sbi, pblk+num-1)) in ext4_remove_blocks()
2559 if (EXT4_PBLK_COFF(sbi, pblk) && ee_len == num) { in ext4_remove_blocks()
2560 first_cluster = (long long) EXT4_B2C(sbi, pblk); in ext4_remove_blocks()
2567 ext4_error(sbi->s_sb, "strange request: removal(2) " in ext4_remove_blocks()
2595 struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); in ext4_ext_rm_leaf() local
2653 if (sbi->s_cluster_ratio > 1) { in ext4_ext_rm_leaf()
2656 -(long long) EXT4_B2C(sbi, pblk); in ext4_ext_rm_leaf()
2758 if (*partial_cluster != (long long) EXT4_B2C(sbi, pblk)) { in ext4_ext_rm_leaf()
2760 EXT4_C2B(sbi, *partial_cluster), in ext4_ext_rm_leaf()
2761 sbi->s_cluster_ratio, in ext4_ext_rm_leaf()
2800 struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); in ext4_ext_remove_space() local
2864 if (sbi->s_cluster_ratio > 1) { in ext4_ext_remove_space()
2867 -(long long) EXT4_B2C(sbi, pblk); in ext4_ext_remove_space()
2881 } else if (sbi->s_cluster_ratio > 1 && end >= ex_end) { in ext4_ext_remove_space()
2897 -(long long) EXT4_B2C(sbi, pblk); in ext4_ext_remove_space()
3017 EXT4_C2B(sbi, partial_cluster), in ext4_ext_remove_space()
3018 sbi->s_cluster_ratio, in ext4_ext_remove_space()
3088 struct ext4_sb_info *sbi = EXT4_SB(sb); in ext4_ext_release() local
3090 sbi->s_ext_blocks, sbi->s_ext_extents, in ext4_ext_release()
3091 sbi->s_ext_blocks / sbi->s_ext_extents); in ext4_ext_release()
3093 sbi->s_ext_min, sbi->s_ext_max, sbi->s_depth_max); in ext4_ext_release()
3397 struct ext4_sb_info *sbi; in ext4_ext_convert_to_initialized() local
3412 sbi = EXT4_SB(inode->i_sb); in ext4_ext_convert_to_initialized()
3557 max_zeroout = sbi->s_extent_max_zeroout_kb >> in ext4_ext_convert_to_initialized()
3847 struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); in ext4_find_delalloc_cluster() local
3849 lblk_start = EXT4_LBLK_CMASK(sbi, lblk); in ext4_find_delalloc_cluster()
3850 lblk_end = lblk_start + sbi->s_cluster_ratio - 1; in ext4_find_delalloc_cluster()
3894 struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); in get_reserved_cluster_alloc() local
3899 alloc_cluster_start = EXT4_B2C(sbi, lblk_start); in get_reserved_cluster_alloc()
3900 alloc_cluster_end = EXT4_B2C(sbi, lblk_start + num_blks - 1); in get_reserved_cluster_alloc()
3908 c_offset = EXT4_LBLK_COFF(sbi, lblk_start); in get_reserved_cluster_alloc()
3910 lblk_from = EXT4_LBLK_CMASK(sbi, lblk_start); in get_reserved_cluster_alloc()
3918 c_offset = EXT4_LBLK_COFF(sbi, lblk_start + num_blks); in get_reserved_cluster_alloc()
3921 lblk_to = lblk_from + (sbi->s_cluster_ratio - c_offset) - 1; in get_reserved_cluster_alloc()
4195 struct ext4_sb_info *sbi = EXT4_SB(sb); in get_implied_cluster_alloc() local
4196 ext4_lblk_t c_offset = EXT4_LBLK_COFF(sbi, map->m_lblk); in get_implied_cluster_alloc()
4204 ex_cluster_start = EXT4_B2C(sbi, ee_block); in get_implied_cluster_alloc()
4205 ex_cluster_end = EXT4_B2C(sbi, ee_block + ee_len - 1); in get_implied_cluster_alloc()
4208 rr_cluster_start = EXT4_B2C(sbi, map->m_lblk); in get_implied_cluster_alloc()
4214 map->m_pblk = EXT4_PBLK_CMASK(sbi, ee_start) + c_offset; in get_implied_cluster_alloc()
4216 (unsigned) sbi->s_cluster_ratio - c_offset); in get_implied_cluster_alloc()
4275 struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); in ext4_ext_map_blocks() local
4378 cluster_offset = EXT4_LBLK_COFF(sbi, map->m_lblk); in ext4_ext_map_blocks()
4405 if ((sbi->s_cluster_ratio > 1) && ex2 && in ext4_ext_map_blocks()
4428 err = ext4_ext_check_overlap(sbi, inode, &newex, path); in ext4_ext_map_blocks()
4446 offset = EXT4_LBLK_COFF(sbi, map->m_lblk); in ext4_ext_map_blocks()
4447 ar.len = EXT4_NUM_B2C(sbi, offset+allocated); in ext4_ext_map_blocks()
4466 ar.len = EXT4_C2B(sbi, ar.len) - offset; in ext4_ext_map_blocks()
4513 EXT4_C2B(sbi, allocated_clusters), fb_flags); in ext4_ext_map_blocks()
4582 EXT4_C2B(sbi, reservation)); in ext4_ext_map_blocks()