Lines Matching refs:bitmap_bh

3744 	struct buffer_head *bitmap_bh = NULL;  in ext4_mb_mark_diskspace_used()  local
3758 bitmap_bh = ext4_read_block_bitmap(sb, ac->ac_b_ex.fe_group); in ext4_mb_mark_diskspace_used()
3759 if (IS_ERR(bitmap_bh)) { in ext4_mb_mark_diskspace_used()
3760 err = PTR_ERR(bitmap_bh); in ext4_mb_mark_diskspace_used()
3761 bitmap_bh = NULL; in ext4_mb_mark_diskspace_used()
3765 BUFFER_TRACE(bitmap_bh, "getting write access"); in ext4_mb_mark_diskspace_used()
3766 err = ext4_journal_get_write_access(handle, sb, bitmap_bh, in ext4_mb_mark_diskspace_used()
3795 mb_set_bits(bitmap_bh->b_data, ac->ac_b_ex.fe_start, in ext4_mb_mark_diskspace_used()
3798 err = ext4_handle_dirty_metadata(handle, NULL, bitmap_bh); in ext4_mb_mark_diskspace_used()
3810 bitmap_bh->b_data)); in ext4_mb_mark_diskspace_used()
3814 mb_set_bits(bitmap_bh->b_data, ac->ac_b_ex.fe_start, in ext4_mb_mark_diskspace_used()
3825 ext4_block_bitmap_csum_set(sb, ac->ac_b_ex.fe_group, gdp, bitmap_bh); in ext4_mb_mark_diskspace_used()
3846 err = ext4_handle_dirty_metadata(handle, NULL, bitmap_bh); in ext4_mb_mark_diskspace_used()
3852 brelse(bitmap_bh); in ext4_mb_mark_diskspace_used()
3863 struct buffer_head *bitmap_bh = NULL; in ext4_mb_mark_bb() local
3892 bitmap_bh = NULL; in ext4_mb_mark_bb()
3896 bitmap_bh = ext4_read_block_bitmap(sb, group); in ext4_mb_mark_bb()
3897 if (IS_ERR(bitmap_bh)) { in ext4_mb_mark_bb()
3898 err = PTR_ERR(bitmap_bh); in ext4_mb_mark_bb()
3899 bitmap_bh = NULL; in ext4_mb_mark_bb()
3911 if (!mb_test_bit(blkoff + i, bitmap_bh->b_data) == in ext4_mb_mark_bb()
3917 mb_set_bits(bitmap_bh->b_data, blkoff, clen); in ext4_mb_mark_bb()
3919 mb_clear_bits(bitmap_bh->b_data, blkoff, clen); in ext4_mb_mark_bb()
3932 ext4_block_bitmap_csum_set(sb, group, gdp, bitmap_bh); in ext4_mb_mark_bb()
3949 err = ext4_handle_dirty_metadata(NULL, NULL, bitmap_bh); in ext4_mb_mark_bb()
3952 sync_dirty_buffer(bitmap_bh); in ext4_mb_mark_bb()
3960 brelse(bitmap_bh); in ext4_mb_mark_bb()
3965 brelse(bitmap_bh); in ext4_mb_mark_bb()
4759 ext4_mb_release_inode_pa(struct ext4_buddy *e4b, struct buffer_head *bitmap_bh, in ext4_mb_release_inode_pa() argument
4778 bit = mb_find_next_zero_bit(bitmap_bh->b_data, end, bit); in ext4_mb_release_inode_pa()
4781 next = mb_find_next_bit(bitmap_bh->b_data, end, bit); in ext4_mb_release_inode_pa()
4845 struct buffer_head *bitmap_bh = NULL; in ext4_mb_discard_group_preallocations() local
4856 bitmap_bh = ext4_read_block_bitmap(sb, group); in ext4_mb_discard_group_preallocations()
4857 if (IS_ERR(bitmap_bh)) { in ext4_mb_discard_group_preallocations()
4858 err = PTR_ERR(bitmap_bh); in ext4_mb_discard_group_preallocations()
4869 put_bh(bitmap_bh); in ext4_mb_discard_group_preallocations()
4914 ext4_mb_release_inode_pa(&e4b, bitmap_bh, pa); in ext4_mb_discard_group_preallocations()
4922 put_bh(bitmap_bh); in ext4_mb_discard_group_preallocations()
4942 struct buffer_head *bitmap_bh = NULL; in ext4_discard_preallocations() local
5029 bitmap_bh = ext4_read_block_bitmap(sb, group); in ext4_discard_preallocations()
5030 if (IS_ERR(bitmap_bh)) { in ext4_discard_preallocations()
5031 err = PTR_ERR(bitmap_bh); in ext4_discard_preallocations()
5040 ext4_mb_release_inode_pa(&e4b, bitmap_bh, pa); in ext4_discard_preallocations()
5044 put_bh(bitmap_bh); in ext4_discard_preallocations()
5776 struct buffer_head *bitmap_bh; in ext4_mb_new_blocks_simple() local
5793 bitmap_bh = ext4_read_block_bitmap(sb, group); in ext4_mb_new_blocks_simple()
5794 if (IS_ERR(bitmap_bh)) { in ext4_mb_new_blocks_simple()
5795 *errp = PTR_ERR(bitmap_bh); in ext4_mb_new_blocks_simple()
5804 i = mb_find_next_zero_bit(bitmap_bh->b_data, max, in ext4_mb_new_blocks_simple()
5814 brelse(bitmap_bh); in ext4_mb_new_blocks_simple()
5834 struct buffer_head *bitmap_bh; in ext4_free_blocks_simple() local
5843 bitmap_bh = ext4_read_block_bitmap(sb, group); in ext4_free_blocks_simple()
5844 if (IS_ERR(bitmap_bh)) { in ext4_free_blocks_simple()
5845 err = PTR_ERR(bitmap_bh); in ext4_free_blocks_simple()
5854 if (!mb_test_bit(blkoff + i, bitmap_bh->b_data)) in ext4_free_blocks_simple()
5857 mb_clear_bits(bitmap_bh->b_data, blkoff, count); in ext4_free_blocks_simple()
5858 err = ext4_handle_dirty_metadata(NULL, NULL, bitmap_bh); in ext4_free_blocks_simple()
5864 ext4_block_bitmap_csum_set(sb, group, gdp, bitmap_bh); in ext4_free_blocks_simple()
5867 sync_dirty_buffer(bitmap_bh); in ext4_free_blocks_simple()
5869 brelse(bitmap_bh); in ext4_free_blocks_simple()
5885 struct buffer_head *bitmap_bh = NULL; in ext4_mb_clear_bb() local
5929 bitmap_bh = ext4_read_block_bitmap(sb, block_group); in ext4_mb_clear_bb()
5930 if (IS_ERR(bitmap_bh)) { in ext4_mb_clear_bb()
5931 err = PTR_ERR(bitmap_bh); in ext4_mb_clear_bb()
5932 bitmap_bh = NULL; in ext4_mb_clear_bb()
5949 BUFFER_TRACE(bitmap_bh, "getting write access"); in ext4_mb_clear_bb()
5950 err = ext4_journal_get_write_access(handle, sb, bitmap_bh, in ext4_mb_clear_bb()
5968 BUG_ON(!mb_test_bit(bit + i, bitmap_bh->b_data)); in ext4_mb_clear_bb()
6001 mb_clear_bits(bitmap_bh->b_data, bit, count_clusters); in ext4_mb_clear_bb()
6020 mb_clear_bits(bitmap_bh->b_data, bit, count_clusters); in ext4_mb_clear_bb()
6026 ext4_block_bitmap_csum_set(sb, block_group, gdp, bitmap_bh); in ext4_mb_clear_bb()
6052 BUFFER_TRACE(bitmap_bh, "dirtied bitmap block"); in ext4_mb_clear_bb()
6053 err = ext4_handle_dirty_metadata(handle, NULL, bitmap_bh); in ext4_mb_clear_bb()
6064 put_bh(bitmap_bh); in ext4_mb_clear_bb()
6070 brelse(bitmap_bh); in ext4_mb_clear_bb()
6189 struct buffer_head *bitmap_bh = NULL; in ext4_group_add_blocks() local
6220 bitmap_bh = ext4_read_block_bitmap(sb, block_group); in ext4_group_add_blocks()
6221 if (IS_ERR(bitmap_bh)) { in ext4_group_add_blocks()
6222 err = PTR_ERR(bitmap_bh); in ext4_group_add_blocks()
6223 bitmap_bh = NULL; in ext4_group_add_blocks()
6241 BUFFER_TRACE(bitmap_bh, "getting write access"); in ext4_group_add_blocks()
6242 err = ext4_journal_get_write_access(handle, sb, bitmap_bh, in ext4_group_add_blocks()
6258 BUFFER_TRACE(bitmap_bh, "clear bit"); in ext4_group_add_blocks()
6259 if (!mb_test_bit(bit + i, bitmap_bh->b_data)) { in ext4_group_add_blocks()
6262 BUFFER_TRACE(bitmap_bh, "bit already cleared"); in ext4_group_add_blocks()
6278 mb_clear_bits(bitmap_bh->b_data, bit, cluster_count); in ext4_group_add_blocks()
6283 ext4_block_bitmap_csum_set(sb, block_group, desc, bitmap_bh); in ext4_group_add_blocks()
6299 BUFFER_TRACE(bitmap_bh, "dirtied bitmap block"); in ext4_group_add_blocks()
6300 err = ext4_handle_dirty_metadata(handle, NULL, bitmap_bh); in ext4_group_add_blocks()
6309 brelse(bitmap_bh); in ext4_group_add_blocks()