Lines Matching refs:bg_bh
69 struct buffer_head *bg_bh,
96 static int ocfs2_test_bg_bit_allocatable(struct buffer_head *bg_bh,
101 struct buffer_head *bg_bh,
342 struct buffer_head *bg_bh,
350 struct ocfs2_group_desc *bg = (struct ocfs2_group_desc *) bg_bh->b_data;
353 if (((unsigned long long) bg_bh->b_blocknr) != group_blkno) {
357 (unsigned long long) bg_bh->b_blocknr);
363 bg_bh,
389 ocfs2_journal_dirty(handle, bg_bh);
425 struct buffer_head *bg_bh;
442 bg_bh = sb_getblk(osb->sb, bg_blkno);
443 if (!bg_bh) {
448 ocfs2_set_new_buffer_uptodate(INODE_CACHE(alloc_inode), bg_bh);
450 status = ocfs2_block_group_fill(handle, alloc_inode, bg_bh,
453 brelse(bg_bh);
458 return status ? ERR_PTR(status) : bg_bh;
483 struct buffer_head *bg_bh,
491 (struct ocfs2_group_desc *)bg_bh->b_data;
500 bg_bh,
537 ocfs2_journal_dirty(handle, bg_bh);
546 struct buffer_head *bg_bh)
553 if (!bg_bh)
556 bg = (struct ocfs2_group_desc *)bg_bh->b_data;
569 ocfs2_remove_from_cache(INODE_CACHE(alloc_inode), bg_bh);
570 brelse(bg_bh);
583 struct buffer_head *bg_bh = NULL;
622 bg_bh = sb_getblk(osb->sb, bg_blkno);
623 if (!bg_bh) {
628 ocfs2_set_new_buffer_uptodate(INODE_CACHE(alloc_inode), bg_bh);
630 status = ocfs2_block_group_fill(handle, alloc_inode, bg_bh,
638 bg_bh, ac, cl, min_bits);
644 ocfs2_bg_alloc_cleanup(handle, ac, alloc_inode, bg_bh);
645 return status ? ERR_PTR(status) : bg_bh;
664 struct buffer_head *bg_bh = NULL;
695 bg_bh = ocfs2_block_group_alloc_contig(osb, handle, alloc_inode,
697 if (PTR_ERR(bg_bh) == -ENOSPC)
698 bg_bh = ocfs2_block_group_alloc_discontig(handle,
701 if (IS_ERR(bg_bh)) {
702 status = PTR_ERR(bg_bh);
703 bg_bh = NULL;
708 bg = (struct ocfs2_group_desc *) bg_bh->b_data;
755 brelse(bg_bh);
1249 static int ocfs2_test_bg_bit_allocatable(struct buffer_head *bg_bh,
1252 struct ocfs2_group_desc *bg = (struct ocfs2_group_desc *) bg_bh->b_data;
1259 jh = jbd2_journal_grab_journal_head(bg_bh);
1276 struct buffer_head *bg_bh,
1284 struct ocfs2_group_desc *bg = (struct ocfs2_group_desc *) bg_bh->b_data;
1297 if (!ocfs2_test_bg_bit_allocatable(bg_bh, offset)) {
1404 struct buffer_head *bg_bh,
1413 struct ocfs2_group_desc *bg = (struct ocfs2_group_desc *) bg_bh->b_data;
1439 bg_bh, OCFS2_JOURNAL_ACCESS_WRITE);
1444 ocfs2_journal_dirty(handle, bg_bh);
2131 struct buffer_head *bg_bh = NULL;
2144 res->sr_bg_stable_blkno, &bg_bh);
2150 bg = (struct ocfs2_group_desc *) bg_bh->b_data;
2164 bg_bh,
2187 brelse(bg_bh);