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()
5782 struct buffer_head *bitmap_bh; in ext4_mb_new_blocks_simple() local
5799 bitmap_bh = ext4_read_block_bitmap(sb, group); in ext4_mb_new_blocks_simple()
5800 if (IS_ERR(bitmap_bh)) { in ext4_mb_new_blocks_simple()
5801 *errp = PTR_ERR(bitmap_bh); in ext4_mb_new_blocks_simple()
5810 i = mb_find_next_zero_bit(bitmap_bh->b_data, max, in ext4_mb_new_blocks_simple()
5820 brelse(bitmap_bh); in ext4_mb_new_blocks_simple()
5840 struct buffer_head *bitmap_bh; in ext4_free_blocks_simple() local
5849 bitmap_bh = ext4_read_block_bitmap(sb, group); in ext4_free_blocks_simple()
5850 if (IS_ERR(bitmap_bh)) { in ext4_free_blocks_simple()
5851 err = PTR_ERR(bitmap_bh); in ext4_free_blocks_simple()
5860 if (!mb_test_bit(blkoff + i, bitmap_bh->b_data)) in ext4_free_blocks_simple()
5863 mb_clear_bits(bitmap_bh->b_data, blkoff, count); in ext4_free_blocks_simple()
5864 err = ext4_handle_dirty_metadata(NULL, NULL, bitmap_bh); in ext4_free_blocks_simple()
5870 ext4_block_bitmap_csum_set(sb, group, gdp, bitmap_bh); in ext4_free_blocks_simple()
5873 sync_dirty_buffer(bitmap_bh); in ext4_free_blocks_simple()
5875 brelse(bitmap_bh); in ext4_free_blocks_simple()
5891 struct buffer_head *bitmap_bh = NULL; in ext4_mb_clear_bb() local
5935 bitmap_bh = ext4_read_block_bitmap(sb, block_group); in ext4_mb_clear_bb()
5936 if (IS_ERR(bitmap_bh)) { in ext4_mb_clear_bb()
5937 err = PTR_ERR(bitmap_bh); in ext4_mb_clear_bb()
5938 bitmap_bh = NULL; in ext4_mb_clear_bb()
5955 BUFFER_TRACE(bitmap_bh, "getting write access"); in ext4_mb_clear_bb()
5956 err = ext4_journal_get_write_access(handle, sb, bitmap_bh, in ext4_mb_clear_bb()
5974 BUG_ON(!mb_test_bit(bit + i, bitmap_bh->b_data)); in ext4_mb_clear_bb()
6007 mb_clear_bits(bitmap_bh->b_data, bit, count_clusters); in ext4_mb_clear_bb()
6026 mb_clear_bits(bitmap_bh->b_data, bit, count_clusters); in ext4_mb_clear_bb()
6032 ext4_block_bitmap_csum_set(sb, block_group, gdp, bitmap_bh); in ext4_mb_clear_bb()
6058 BUFFER_TRACE(bitmap_bh, "dirtied bitmap block"); in ext4_mb_clear_bb()
6059 err = ext4_handle_dirty_metadata(handle, NULL, bitmap_bh); in ext4_mb_clear_bb()
6070 put_bh(bitmap_bh); in ext4_mb_clear_bb()
6076 brelse(bitmap_bh); in ext4_mb_clear_bb()
6195 struct buffer_head *bitmap_bh = NULL; in ext4_group_add_blocks() local
6226 bitmap_bh = ext4_read_block_bitmap(sb, block_group); in ext4_group_add_blocks()
6227 if (IS_ERR(bitmap_bh)) { in ext4_group_add_blocks()
6228 err = PTR_ERR(bitmap_bh); in ext4_group_add_blocks()
6229 bitmap_bh = NULL; in ext4_group_add_blocks()
6247 BUFFER_TRACE(bitmap_bh, "getting write access"); in ext4_group_add_blocks()
6248 err = ext4_journal_get_write_access(handle, sb, bitmap_bh, in ext4_group_add_blocks()
6264 BUFFER_TRACE(bitmap_bh, "clear bit"); in ext4_group_add_blocks()
6265 if (!mb_test_bit(bit + i, bitmap_bh->b_data)) { in ext4_group_add_blocks()
6268 BUFFER_TRACE(bitmap_bh, "bit already cleared"); in ext4_group_add_blocks()
6284 mb_clear_bits(bitmap_bh->b_data, bit, cluster_count); in ext4_group_add_blocks()
6289 ext4_block_bitmap_csum_set(sb, block_group, desc, bitmap_bh); in ext4_group_add_blocks()
6305 BUFFER_TRACE(bitmap_bh, "dirtied bitmap block"); in ext4_group_add_blocks()
6306 err = ext4_handle_dirty_metadata(handle, NULL, bitmap_bh); in ext4_group_add_blocks()
6315 brelse(bitmap_bh); in ext4_group_add_blocks()