Lines Matching refs:bg_bh

71 				  struct buffer_head *bg_bh,
98 static int ocfs2_test_bg_bit_allocatable(struct buffer_head *bg_bh,
103 struct buffer_head *bg_bh,
344 struct buffer_head *bg_bh,
352 struct ocfs2_group_desc *bg = (struct ocfs2_group_desc *) bg_bh->b_data;
355 if (((unsigned long long) bg_bh->b_blocknr) != group_blkno) {
359 (unsigned long long) bg_bh->b_blocknr);
365 bg_bh,
391 ocfs2_journal_dirty(handle, bg_bh);
427 struct buffer_head *bg_bh;
444 bg_bh = sb_getblk(osb->sb, bg_blkno);
445 if (!bg_bh) {
450 ocfs2_set_new_buffer_uptodate(INODE_CACHE(alloc_inode), bg_bh);
452 status = ocfs2_block_group_fill(handle, alloc_inode, bg_bh,
455 brelse(bg_bh);
460 return status ? ERR_PTR(status) : bg_bh;
485 struct buffer_head *bg_bh,
493 (struct ocfs2_group_desc *)bg_bh->b_data;
502 bg_bh,
539 ocfs2_journal_dirty(handle, bg_bh);
548 struct buffer_head *bg_bh)
555 if (!bg_bh)
558 bg = (struct ocfs2_group_desc *)bg_bh->b_data;
571 ocfs2_remove_from_cache(INODE_CACHE(alloc_inode), bg_bh);
572 brelse(bg_bh);
585 struct buffer_head *bg_bh = NULL;
624 bg_bh = sb_getblk(osb->sb, bg_blkno);
625 if (!bg_bh) {
630 ocfs2_set_new_buffer_uptodate(INODE_CACHE(alloc_inode), bg_bh);
632 status = ocfs2_block_group_fill(handle, alloc_inode, bg_bh,
640 bg_bh, ac, cl, min_bits);
646 ocfs2_bg_alloc_cleanup(handle, ac, alloc_inode, bg_bh);
647 return status ? ERR_PTR(status) : bg_bh;
666 struct buffer_head *bg_bh = NULL;
697 bg_bh = ocfs2_block_group_alloc_contig(osb, handle, alloc_inode,
699 if (PTR_ERR(bg_bh) == -ENOSPC)
700 bg_bh = ocfs2_block_group_alloc_discontig(handle,
703 if (IS_ERR(bg_bh)) {
704 status = PTR_ERR(bg_bh);
705 bg_bh = NULL;
710 bg = (struct ocfs2_group_desc *) bg_bh->b_data;
757 brelse(bg_bh);
1251 static int ocfs2_test_bg_bit_allocatable(struct buffer_head *bg_bh,
1254 struct ocfs2_group_desc *bg = (struct ocfs2_group_desc *) bg_bh->b_data;
1261 jh = jbd2_journal_grab_journal_head(bg_bh);
1278 struct buffer_head *bg_bh,
1286 struct ocfs2_group_desc *bg = (struct ocfs2_group_desc *) bg_bh->b_data;
1299 if (!ocfs2_test_bg_bit_allocatable(bg_bh, offset)) {
1406 struct buffer_head *bg_bh,
1415 struct ocfs2_group_desc *bg = (struct ocfs2_group_desc *) bg_bh->b_data;
1441 bg_bh, OCFS2_JOURNAL_ACCESS_WRITE);
1446 ocfs2_journal_dirty(handle, bg_bh);
2133 struct buffer_head *bg_bh = NULL;
2146 res->sr_bg_stable_blkno, &bg_bh);
2152 bg = (struct ocfs2_group_desc *) bg_bh->b_data;
2166 bg_bh,
2189 brelse(bg_bh);