Lines Matching refs:bitmap_bh
3777 struct buffer_head *bitmap_bh = NULL; in ext4_mb_mark_diskspace_used() local
3791 bitmap_bh = ext4_read_block_bitmap(sb, ac->ac_b_ex.fe_group); in ext4_mb_mark_diskspace_used()
3792 if (IS_ERR(bitmap_bh)) { in ext4_mb_mark_diskspace_used()
3793 err = PTR_ERR(bitmap_bh); in ext4_mb_mark_diskspace_used()
3794 bitmap_bh = NULL; in ext4_mb_mark_diskspace_used()
3798 BUFFER_TRACE(bitmap_bh, "getting write access"); in ext4_mb_mark_diskspace_used()
3799 err = ext4_journal_get_write_access(handle, sb, bitmap_bh, in ext4_mb_mark_diskspace_used()
3828 ext4_set_bits(bitmap_bh->b_data, ac->ac_b_ex.fe_start, in ext4_mb_mark_diskspace_used()
3831 err = ext4_handle_dirty_metadata(handle, NULL, bitmap_bh); in ext4_mb_mark_diskspace_used()
3843 bitmap_bh->b_data)); in ext4_mb_mark_diskspace_used()
3847 ext4_set_bits(bitmap_bh->b_data, ac->ac_b_ex.fe_start, in ext4_mb_mark_diskspace_used()
3858 ext4_block_bitmap_csum_set(sb, ac->ac_b_ex.fe_group, gdp, bitmap_bh); in ext4_mb_mark_diskspace_used()
3879 err = ext4_handle_dirty_metadata(handle, NULL, bitmap_bh); in ext4_mb_mark_diskspace_used()
3885 brelse(bitmap_bh); in ext4_mb_mark_diskspace_used()
3896 struct buffer_head *bitmap_bh = NULL; in ext4_mb_mark_bb() local
3908 bitmap_bh = ext4_read_block_bitmap(sb, group); in ext4_mb_mark_bb()
3909 if (IS_ERR(bitmap_bh)) { in ext4_mb_mark_bb()
3910 err = PTR_ERR(bitmap_bh); in ext4_mb_mark_bb()
3911 bitmap_bh = NULL; in ext4_mb_mark_bb()
3923 if (!mb_test_bit(blkoff + i, bitmap_bh->b_data) == !state) in ext4_mb_mark_bb()
3927 ext4_set_bits(bitmap_bh->b_data, blkoff, clen); in ext4_mb_mark_bb()
3929 mb_test_and_clear_bits(bitmap_bh->b_data, blkoff, clen); in ext4_mb_mark_bb()
3943 ext4_block_bitmap_csum_set(sb, group, gdp, bitmap_bh); in ext4_mb_mark_bb()
3956 err = ext4_handle_dirty_metadata(NULL, NULL, bitmap_bh); in ext4_mb_mark_bb()
3959 sync_dirty_buffer(bitmap_bh); in ext4_mb_mark_bb()
3964 brelse(bitmap_bh); in ext4_mb_mark_bb()
4734 ext4_mb_release_inode_pa(struct ext4_buddy *e4b, struct buffer_head *bitmap_bh, in ext4_mb_release_inode_pa() argument
4753 bit = mb_find_next_zero_bit(bitmap_bh->b_data, end, bit); in ext4_mb_release_inode_pa()
4756 next = mb_find_next_bit(bitmap_bh->b_data, end, bit); in ext4_mb_release_inode_pa()
4820 struct buffer_head *bitmap_bh = NULL; in ext4_mb_discard_group_preallocations() local
4832 bitmap_bh = ext4_read_block_bitmap(sb, group); in ext4_mb_discard_group_preallocations()
4833 if (IS_ERR(bitmap_bh)) { in ext4_mb_discard_group_preallocations()
4834 err = PTR_ERR(bitmap_bh); in ext4_mb_discard_group_preallocations()
4845 put_bh(bitmap_bh); in ext4_mb_discard_group_preallocations()
4895 ext4_mb_release_inode_pa(&e4b, bitmap_bh, pa); in ext4_mb_discard_group_preallocations()
4912 put_bh(bitmap_bh); in ext4_mb_discard_group_preallocations()
4932 struct buffer_head *bitmap_bh = NULL; in ext4_discard_preallocations() local
5019 bitmap_bh = ext4_read_block_bitmap(sb, group); in ext4_discard_preallocations()
5020 if (IS_ERR(bitmap_bh)) { in ext4_discard_preallocations()
5021 err = PTR_ERR(bitmap_bh); in ext4_discard_preallocations()
5030 ext4_mb_release_inode_pa(&e4b, bitmap_bh, pa); in ext4_discard_preallocations()
5034 put_bh(bitmap_bh); in ext4_discard_preallocations()
5756 struct buffer_head *bitmap_bh; in ext4_mb_new_blocks_simple() local
5772 bitmap_bh = ext4_read_block_bitmap(sb, group); in ext4_mb_new_blocks_simple()
5773 if (IS_ERR(bitmap_bh)) { in ext4_mb_new_blocks_simple()
5774 *errp = PTR_ERR(bitmap_bh); in ext4_mb_new_blocks_simple()
5782 i = mb_find_next_zero_bit(bitmap_bh->b_data, sb->s_blocksize, in ext4_mb_new_blocks_simple()
5784 brelse(bitmap_bh); in ext4_mb_new_blocks_simple()
5806 struct buffer_head *bitmap_bh; in ext4_free_blocks_simple() local
5815 bitmap_bh = ext4_read_block_bitmap(sb, group); in ext4_free_blocks_simple()
5816 if (IS_ERR(bitmap_bh)) { in ext4_free_blocks_simple()
5817 err = PTR_ERR(bitmap_bh); in ext4_free_blocks_simple()
5826 if (!mb_test_bit(blkoff + i, bitmap_bh->b_data)) in ext4_free_blocks_simple()
5829 mb_clear_bits(bitmap_bh->b_data, blkoff, count); in ext4_free_blocks_simple()
5830 err = ext4_handle_dirty_metadata(NULL, NULL, bitmap_bh); in ext4_free_blocks_simple()
5836 ext4_block_bitmap_csum_set(sb, group, gdp, bitmap_bh); in ext4_free_blocks_simple()
5839 sync_dirty_buffer(bitmap_bh); in ext4_free_blocks_simple()
5841 brelse(bitmap_bh); in ext4_free_blocks_simple()
5857 struct buffer_head *bitmap_bh = NULL; in ext4_free_blocks() local
5964 bitmap_bh = ext4_read_block_bitmap(sb, block_group); in ext4_free_blocks()
5965 if (IS_ERR(bitmap_bh)) { in ext4_free_blocks()
5966 err = PTR_ERR(bitmap_bh); in ext4_free_blocks()
5967 bitmap_bh = NULL; in ext4_free_blocks()
5989 BUFFER_TRACE(bitmap_bh, "getting write access"); in ext4_free_blocks()
5990 err = ext4_journal_get_write_access(handle, sb, bitmap_bh, in ext4_free_blocks()
6008 BUG_ON(!mb_test_bit(bit + i, bitmap_bh->b_data)); in ext4_free_blocks()
6041 mb_clear_bits(bitmap_bh->b_data, bit, count_clusters); in ext4_free_blocks()
6060 mb_clear_bits(bitmap_bh->b_data, bit, count_clusters); in ext4_free_blocks()
6066 ext4_block_bitmap_csum_set(sb, block_group, gdp, bitmap_bh); in ext4_free_blocks()
6092 BUFFER_TRACE(bitmap_bh, "dirtied bitmap block"); in ext4_free_blocks()
6093 err = ext4_handle_dirty_metadata(handle, NULL, bitmap_bh); in ext4_free_blocks()
6104 put_bh(bitmap_bh); in ext4_free_blocks()
6108 brelse(bitmap_bh); in ext4_free_blocks()
6125 struct buffer_head *bitmap_bh = NULL; in ext4_group_add_blocks() local
6156 bitmap_bh = ext4_read_block_bitmap(sb, block_group); in ext4_group_add_blocks()
6157 if (IS_ERR(bitmap_bh)) { in ext4_group_add_blocks()
6158 err = PTR_ERR(bitmap_bh); in ext4_group_add_blocks()
6159 bitmap_bh = NULL; in ext4_group_add_blocks()
6181 BUFFER_TRACE(bitmap_bh, "getting write access"); in ext4_group_add_blocks()
6182 err = ext4_journal_get_write_access(handle, sb, bitmap_bh, in ext4_group_add_blocks()
6198 BUFFER_TRACE(bitmap_bh, "clear bit"); in ext4_group_add_blocks()
6199 if (!mb_test_bit(bit + i, bitmap_bh->b_data)) { in ext4_group_add_blocks()
6202 BUFFER_TRACE(bitmap_bh, "bit already cleared"); in ext4_group_add_blocks()
6218 mb_clear_bits(bitmap_bh->b_data, bit, cluster_count); in ext4_group_add_blocks()
6223 ext4_block_bitmap_csum_set(sb, block_group, desc, bitmap_bh); in ext4_group_add_blocks()
6239 BUFFER_TRACE(bitmap_bh, "dirtied bitmap block"); in ext4_group_add_blocks()
6240 err = ext4_handle_dirty_metadata(handle, NULL, bitmap_bh); in ext4_group_add_blocks()
6249 brelse(bitmap_bh); in ext4_group_add_blocks()