Lines Matching refs:bitmap_bh
3965 struct buffer_head *bitmap_bh = NULL; in ext4_mb_mark_diskspace_used() local
3979 bitmap_bh = ext4_read_block_bitmap(sb, ac->ac_b_ex.fe_group); in ext4_mb_mark_diskspace_used()
3980 if (IS_ERR(bitmap_bh)) { in ext4_mb_mark_diskspace_used()
3981 return PTR_ERR(bitmap_bh); in ext4_mb_mark_diskspace_used()
3984 BUFFER_TRACE(bitmap_bh, "getting write access"); in ext4_mb_mark_diskspace_used()
3985 err = ext4_journal_get_write_access(handle, sb, bitmap_bh, in ext4_mb_mark_diskspace_used()
4014 mb_set_bits(bitmap_bh->b_data, ac->ac_b_ex.fe_start, in ext4_mb_mark_diskspace_used()
4017 err = ext4_handle_dirty_metadata(handle, NULL, bitmap_bh); in ext4_mb_mark_diskspace_used()
4029 bitmap_bh->b_data)); in ext4_mb_mark_diskspace_used()
4033 mb_set_bits(bitmap_bh->b_data, ac->ac_b_ex.fe_start, in ext4_mb_mark_diskspace_used()
4044 ext4_block_bitmap_csum_set(sb, gdp, bitmap_bh); in ext4_mb_mark_diskspace_used()
4065 err = ext4_handle_dirty_metadata(handle, NULL, bitmap_bh); in ext4_mb_mark_diskspace_used()
4071 brelse(bitmap_bh); in ext4_mb_mark_diskspace_used()
4082 struct buffer_head *bitmap_bh = NULL; in ext4_mb_mark_bb() local
4111 bitmap_bh = NULL; in ext4_mb_mark_bb()
4115 bitmap_bh = ext4_read_block_bitmap(sb, group); in ext4_mb_mark_bb()
4116 if (IS_ERR(bitmap_bh)) { in ext4_mb_mark_bb()
4117 err = PTR_ERR(bitmap_bh); in ext4_mb_mark_bb()
4118 bitmap_bh = NULL; in ext4_mb_mark_bb()
4130 if (!mb_test_bit(blkoff + i, bitmap_bh->b_data) == in ext4_mb_mark_bb()
4136 mb_set_bits(bitmap_bh->b_data, blkoff, clen); in ext4_mb_mark_bb()
4138 mb_clear_bits(bitmap_bh->b_data, blkoff, clen); in ext4_mb_mark_bb()
4151 ext4_block_bitmap_csum_set(sb, gdp, bitmap_bh); in ext4_mb_mark_bb()
4168 err = ext4_handle_dirty_metadata(NULL, NULL, bitmap_bh); in ext4_mb_mark_bb()
4171 sync_dirty_buffer(bitmap_bh); in ext4_mb_mark_bb()
4179 brelse(bitmap_bh); in ext4_mb_mark_bb()
4184 brelse(bitmap_bh); in ext4_mb_mark_bb()
5323 ext4_mb_release_inode_pa(struct ext4_buddy *e4b, struct buffer_head *bitmap_bh, in ext4_mb_release_inode_pa() argument
5342 bit = mb_find_next_zero_bit(bitmap_bh->b_data, end, bit); in ext4_mb_release_inode_pa()
5345 next = mb_find_next_bit(bitmap_bh->b_data, end, bit); in ext4_mb_release_inode_pa()
5413 struct buffer_head *bitmap_bh = NULL; in ext4_mb_discard_group_preallocations() local
5427 bitmap_bh = ext4_read_block_bitmap(sb, group); in ext4_mb_discard_group_preallocations()
5428 if (IS_ERR(bitmap_bh)) { in ext4_mb_discard_group_preallocations()
5429 err = PTR_ERR(bitmap_bh); in ext4_mb_discard_group_preallocations()
5440 put_bh(bitmap_bh); in ext4_mb_discard_group_preallocations()
5494 ext4_mb_release_inode_pa(&e4b, bitmap_bh, pa); in ext4_mb_discard_group_preallocations()
5501 put_bh(bitmap_bh); in ext4_mb_discard_group_preallocations()
5521 struct buffer_head *bitmap_bh = NULL; in ext4_discard_preallocations() local
5608 bitmap_bh = ext4_read_block_bitmap(sb, group); in ext4_discard_preallocations()
5609 if (IS_ERR(bitmap_bh)) { in ext4_discard_preallocations()
5610 err = PTR_ERR(bitmap_bh); in ext4_discard_preallocations()
5619 ext4_mb_release_inode_pa(&e4b, bitmap_bh, pa); in ext4_discard_preallocations()
5623 put_bh(bitmap_bh); in ext4_discard_preallocations()
6080 struct buffer_head *bitmap_bh; in ext4_mb_new_blocks_simple() local
6098 bitmap_bh = ext4_read_block_bitmap(sb, group); in ext4_mb_new_blocks_simple()
6099 if (IS_ERR(bitmap_bh)) { in ext4_mb_new_blocks_simple()
6100 *errp = PTR_ERR(bitmap_bh); in ext4_mb_new_blocks_simple()
6106 i = mb_find_next_zero_bit(bitmap_bh->b_data, max, in ext4_mb_new_blocks_simple()
6117 brelse(bitmap_bh); in ext4_mb_new_blocks_simple()
6389 struct buffer_head *bitmap_bh; in ext4_free_blocks_simple() local
6398 bitmap_bh = ext4_read_block_bitmap(sb, group); in ext4_free_blocks_simple()
6399 if (IS_ERR(bitmap_bh)) { in ext4_free_blocks_simple()
6408 if (!mb_test_bit(blkoff + i, bitmap_bh->b_data)) in ext4_free_blocks_simple()
6411 mb_clear_bits(bitmap_bh->b_data, blkoff, count); in ext4_free_blocks_simple()
6412 err = ext4_handle_dirty_metadata(NULL, NULL, bitmap_bh); in ext4_free_blocks_simple()
6418 ext4_block_bitmap_csum_set(sb, gdp, bitmap_bh); in ext4_free_blocks_simple()
6421 sync_dirty_buffer(bitmap_bh); in ext4_free_blocks_simple()
6425 brelse(bitmap_bh); in ext4_free_blocks_simple()
6441 struct buffer_head *bitmap_bh = NULL; in ext4_mb_clear_bb() local
6486 bitmap_bh = ext4_read_block_bitmap(sb, block_group); in ext4_mb_clear_bb()
6487 if (IS_ERR(bitmap_bh)) { in ext4_mb_clear_bb()
6488 err = PTR_ERR(bitmap_bh); in ext4_mb_clear_bb()
6489 bitmap_bh = NULL; in ext4_mb_clear_bb()
6506 BUFFER_TRACE(bitmap_bh, "getting write access"); in ext4_mb_clear_bb()
6507 err = ext4_journal_get_write_access(handle, sb, bitmap_bh, in ext4_mb_clear_bb()
6525 BUG_ON(!mb_test_bit(bit + i, bitmap_bh->b_data)); in ext4_mb_clear_bb()
6558 mb_clear_bits(bitmap_bh->b_data, bit, count_clusters); in ext4_mb_clear_bb()
6577 mb_clear_bits(bitmap_bh->b_data, bit, count_clusters); in ext4_mb_clear_bb()
6583 ext4_block_bitmap_csum_set(sb, gdp, bitmap_bh); in ext4_mb_clear_bb()
6609 BUFFER_TRACE(bitmap_bh, "dirtied bitmap block"); in ext4_mb_clear_bb()
6610 err = ext4_handle_dirty_metadata(handle, NULL, bitmap_bh); in ext4_mb_clear_bb()
6621 put_bh(bitmap_bh); in ext4_mb_clear_bb()
6627 brelse(bitmap_bh); in ext4_mb_clear_bb()
6745 struct buffer_head *bitmap_bh = NULL; in ext4_group_add_blocks() local
6776 bitmap_bh = ext4_read_block_bitmap(sb, block_group); in ext4_group_add_blocks()
6777 if (IS_ERR(bitmap_bh)) { in ext4_group_add_blocks()
6778 err = PTR_ERR(bitmap_bh); in ext4_group_add_blocks()
6779 bitmap_bh = NULL; in ext4_group_add_blocks()
6797 BUFFER_TRACE(bitmap_bh, "getting write access"); in ext4_group_add_blocks()
6798 err = ext4_journal_get_write_access(handle, sb, bitmap_bh, in ext4_group_add_blocks()
6814 BUFFER_TRACE(bitmap_bh, "clear bit"); in ext4_group_add_blocks()
6815 if (!mb_test_bit(bit + i, bitmap_bh->b_data)) { in ext4_group_add_blocks()
6818 BUFFER_TRACE(bitmap_bh, "bit already cleared"); in ext4_group_add_blocks()
6834 mb_clear_bits(bitmap_bh->b_data, bit, cluster_count); in ext4_group_add_blocks()
6839 ext4_block_bitmap_csum_set(sb, desc, bitmap_bh); in ext4_group_add_blocks()
6855 BUFFER_TRACE(bitmap_bh, "dirtied bitmap block"); in ext4_group_add_blocks()
6856 err = ext4_handle_dirty_metadata(handle, NULL, bitmap_bh); in ext4_group_add_blocks()
6865 brelse(bitmap_bh); in ext4_group_add_blocks()