Lines Matching refs:bg_bh

73 				  struct buffer_head *bg_bh,
100 static int ocfs2_test_bg_bit_allocatable(struct buffer_head *bg_bh,
105 struct buffer_head *bg_bh,
346 struct buffer_head *bg_bh, in ocfs2_block_group_fill() argument
354 struct ocfs2_group_desc *bg = (struct ocfs2_group_desc *) bg_bh->b_data; in ocfs2_block_group_fill()
357 if (((unsigned long long) bg_bh->b_blocknr) != group_blkno) { in ocfs2_block_group_fill()
361 (unsigned long long) bg_bh->b_blocknr); in ocfs2_block_group_fill()
367 bg_bh, in ocfs2_block_group_fill()
393 ocfs2_journal_dirty(handle, bg_bh); in ocfs2_block_group_fill()
429 struct buffer_head *bg_bh; in ocfs2_block_group_alloc_contig() local
446 bg_bh = sb_getblk(osb->sb, bg_blkno); in ocfs2_block_group_alloc_contig()
447 if (!bg_bh) { in ocfs2_block_group_alloc_contig()
452 ocfs2_set_new_buffer_uptodate(INODE_CACHE(alloc_inode), bg_bh); in ocfs2_block_group_alloc_contig()
454 status = ocfs2_block_group_fill(handle, alloc_inode, bg_bh, in ocfs2_block_group_alloc_contig()
457 brelse(bg_bh); in ocfs2_block_group_alloc_contig()
462 return status ? ERR_PTR(status) : bg_bh; in ocfs2_block_group_alloc_contig()
487 struct buffer_head *bg_bh, in ocfs2_block_group_grow_discontig() argument
495 (struct ocfs2_group_desc *)bg_bh->b_data; in ocfs2_block_group_grow_discontig()
504 bg_bh, in ocfs2_block_group_grow_discontig()
541 ocfs2_journal_dirty(handle, bg_bh); in ocfs2_block_group_grow_discontig()
550 struct buffer_head *bg_bh) in ocfs2_bg_alloc_cleanup() argument
557 if (!bg_bh) in ocfs2_bg_alloc_cleanup()
560 bg = (struct ocfs2_group_desc *)bg_bh->b_data; in ocfs2_bg_alloc_cleanup()
573 ocfs2_remove_from_cache(INODE_CACHE(alloc_inode), bg_bh); in ocfs2_bg_alloc_cleanup()
574 brelse(bg_bh); in ocfs2_bg_alloc_cleanup()
587 struct buffer_head *bg_bh = NULL; in ocfs2_block_group_alloc_discontig() local
626 bg_bh = sb_getblk(osb->sb, bg_blkno); in ocfs2_block_group_alloc_discontig()
627 if (!bg_bh) { in ocfs2_block_group_alloc_discontig()
632 ocfs2_set_new_buffer_uptodate(INODE_CACHE(alloc_inode), bg_bh); in ocfs2_block_group_alloc_discontig()
634 status = ocfs2_block_group_fill(handle, alloc_inode, bg_bh, in ocfs2_block_group_alloc_discontig()
642 bg_bh, ac, cl, min_bits); in ocfs2_block_group_alloc_discontig()
648 ocfs2_bg_alloc_cleanup(handle, ac, alloc_inode, bg_bh); in ocfs2_block_group_alloc_discontig()
649 return status ? ERR_PTR(status) : bg_bh; in ocfs2_block_group_alloc_discontig()
668 struct buffer_head *bg_bh = NULL; in ocfs2_block_group_alloc() local
699 bg_bh = ocfs2_block_group_alloc_contig(osb, handle, alloc_inode, in ocfs2_block_group_alloc()
701 if (PTR_ERR(bg_bh) == -ENOSPC) in ocfs2_block_group_alloc()
702 bg_bh = ocfs2_block_group_alloc_discontig(handle, in ocfs2_block_group_alloc()
705 if (IS_ERR(bg_bh)) { in ocfs2_block_group_alloc()
706 status = PTR_ERR(bg_bh); in ocfs2_block_group_alloc()
707 bg_bh = NULL; in ocfs2_block_group_alloc()
712 bg = (struct ocfs2_group_desc *) bg_bh->b_data; in ocfs2_block_group_alloc()
759 brelse(bg_bh); in ocfs2_block_group_alloc()
1253 static int ocfs2_test_bg_bit_allocatable(struct buffer_head *bg_bh, in ocfs2_test_bg_bit_allocatable() argument
1256 struct ocfs2_group_desc *bg = (struct ocfs2_group_desc *) bg_bh->b_data; in ocfs2_test_bg_bit_allocatable()
1263 jh = jbd2_journal_grab_journal_head(bg_bh); in ocfs2_test_bg_bit_allocatable()
1300 struct buffer_head *bg_bh, in ocfs2_block_group_find_clear_bits() argument
1309 struct ocfs2_group_desc *bg = (struct ocfs2_group_desc *) bg_bh->b_data; in ocfs2_block_group_find_clear_bits()
1320 if (!ocfs2_test_bg_bit_allocatable(bg_bh, offset)) { in ocfs2_block_group_find_clear_bits()
1458 struct buffer_head *bg_bh, in ocfs2_relink_block_group() argument
1467 struct ocfs2_group_desc *bg = (struct ocfs2_group_desc *) bg_bh->b_data; in ocfs2_relink_block_group()
1493 bg_bh, OCFS2_JOURNAL_ACCESS_WRITE); in ocfs2_relink_block_group()
1498 ocfs2_journal_dirty(handle, bg_bh); in ocfs2_relink_block_group()
2186 struct buffer_head *bg_bh = NULL; in ocfs2_claim_new_inode_at_loc() local
2199 res->sr_bg_stable_blkno, &bg_bh); in ocfs2_claim_new_inode_at_loc()
2205 bg = (struct ocfs2_group_desc *) bg_bh->b_data; in ocfs2_claim_new_inode_at_loc()
2219 bg_bh, in ocfs2_claim_new_inode_at_loc()
2244 brelse(bg_bh); in ocfs2_claim_new_inode_at_loc()