• Home
  • Raw
  • Download

Lines Matching refs:bh

34 	struct buffer_head *bh;  member
37 static inline void add_chain(Indirect *p, struct buffer_head *bh, __le32 *v) in add_chain() argument
40 p->bh = bh; in add_chain()
150 struct buffer_head *bh; in ext4_get_branch() local
159 bh = sb_getblk(sb, le32_to_cpu(p->key)); in ext4_get_branch()
160 if (unlikely(!bh)) { in ext4_get_branch()
165 if (!bh_uptodate_or_lock(bh)) { in ext4_get_branch()
166 if (bh_submit_read(bh) < 0) { in ext4_get_branch()
167 put_bh(bh); in ext4_get_branch()
171 if (ext4_check_indirect_blockref(inode, bh)) { in ext4_get_branch()
172 put_bh(bh); in ext4_get_branch()
177 add_chain(++p, bh, (__le32 *)bh->b_data + *++offsets); in ext4_get_branch()
213 __le32 *start = ind->bh ? (__le32 *) ind->bh->b_data : ei->i_data; in ext4_find_near()
223 if (ind->bh) in ext4_find_near()
224 return ind->bh->b_blocknr; in ext4_find_near()
326 struct buffer_head * bh; in ext4_alloc_branch() local
347 bh = branch[i].bh = sb_getblk(ar->inode->i_sb, new_blocks[i-1]); in ext4_alloc_branch()
348 if (unlikely(!bh)) { in ext4_alloc_branch()
352 lock_buffer(bh); in ext4_alloc_branch()
353 BUFFER_TRACE(bh, "call get_create_access"); in ext4_alloc_branch()
354 err = ext4_journal_get_create_access(handle, bh); in ext4_alloc_branch()
356 unlock_buffer(bh); in ext4_alloc_branch()
360 memset(bh->b_data, 0, bh->b_size); in ext4_alloc_branch()
361 p = branch[i].p = (__le32 *) bh->b_data + offsets[i]; in ext4_alloc_branch()
369 BUFFER_TRACE(bh, "marking uptodate"); in ext4_alloc_branch()
370 set_buffer_uptodate(bh); in ext4_alloc_branch()
371 unlock_buffer(bh); in ext4_alloc_branch()
373 BUFFER_TRACE(bh, "call ext4_handle_dirty_metadata"); in ext4_alloc_branch()
374 err = ext4_handle_dirty_metadata(handle, ar->inode, bh); in ext4_alloc_branch()
387 if (i > 0 && i != indirect_blks && branch[i].bh) in ext4_alloc_branch()
388 ext4_forget(handle, 1, ar->inode, branch[i].bh, in ext4_alloc_branch()
389 branch[i].bh->b_blocknr); in ext4_alloc_branch()
420 if (where->bh) { in ext4_splice_branch()
421 BUFFER_TRACE(where->bh, "get_write_access"); in ext4_splice_branch()
422 err = ext4_journal_get_write_access(handle, where->bh); in ext4_splice_branch()
442 if (where->bh) { in ext4_splice_branch()
452 BUFFER_TRACE(where->bh, "call ext4_handle_dirty_metadata"); in ext4_splice_branch()
453 err = ext4_handle_dirty_metadata(handle, ar->inode, where->bh); in ext4_splice_branch()
472 ext4_free_blocks(handle, ar->inode, where[i].bh, 0, 1, in ext4_splice_branch()
643 BUFFER_TRACE(partial->bh, "call brelse"); in ext4_ind_map_blocks()
644 brelse(partial->bh); in ext4_ind_map_blocks()
785 for (p = partial; (p > chain) && all_zeroes((__le32 *) p->bh->b_data, p->p); p--) in ext4_find_shared()
805 brelse(partial->bh); in ext4_find_shared()
824 struct buffer_head *bh, in ext4_clear_blocks() argument
848 if (bh) { in ext4_clear_blocks()
849 BUFFER_TRACE(bh, "call ext4_handle_dirty_metadata"); in ext4_clear_blocks()
850 err = ext4_handle_dirty_metadata(handle, inode, bh); in ext4_clear_blocks()
861 if (bh) { in ext4_clear_blocks()
862 BUFFER_TRACE(bh, "retaking write access"); in ext4_clear_blocks()
863 err = ext4_journal_get_write_access(handle, bh); in ext4_clear_blocks()
994 struct buffer_head *bh; in ext4_free_branches() local
1012 bh = sb_bread(inode->i_sb, nr); in ext4_free_branches()
1018 if (!bh) { in ext4_free_branches()
1025 BUFFER_TRACE(bh, "free child branches"); in ext4_free_branches()
1026 ext4_free_branches(handle, inode, bh, in ext4_free_branches()
1027 (__le32 *) bh->b_data, in ext4_free_branches()
1028 (__le32 *) bh->b_data + addr_per_block, in ext4_free_branches()
1030 brelse(bh); in ext4_free_branches()
1156 BUFFER_TRACE(partial->bh, "get_write_access"); in ext4_ind_truncate()
1157 ext4_free_branches(handle, inode, partial->bh, in ext4_ind_truncate()
1164 ext4_free_branches(handle, inode, partial->bh, partial->p + 1, in ext4_ind_truncate()
1165 (__le32*)partial->bh->b_data+addr_per_block, in ext4_ind_truncate()
1167 BUFFER_TRACE(partial->bh, "call brelse"); in ext4_ind_truncate()
1168 brelse(partial->bh); in ext4_ind_truncate()
1270 BUFFER_TRACE(partial->bh, "get_write_access"); in ext4_ind_remove_space()
1271 ext4_free_branches(handle, inode, partial->bh, in ext4_ind_remove_space()
1282 ext4_free_branches(handle, inode, partial->bh, in ext4_ind_remove_space()
1284 (__le32 *)partial->bh->b_data+addr_per_block, in ext4_ind_remove_space()
1316 ext4_free_branches(handle, inode, partial2->bh, in ext4_ind_remove_space()
1317 (__le32 *)partial2->bh->b_data, in ext4_ind_remove_space()
1351 BUFFER_TRACE(partial->bh, "get_write_access"); in ext4_ind_remove_space()
1352 ext4_free_branches(handle, inode, partial->bh, in ext4_ind_remove_space()
1375 partial->bh->b_blocknr == partial2->bh->b_blocknr) { in ext4_ind_remove_space()
1380 ext4_free_branches(handle, inode, partial->bh, in ext4_ind_remove_space()
1395 ext4_free_branches(handle, inode, partial->bh, in ext4_ind_remove_space()
1397 (__le32 *)partial->bh->b_data+addr_per_block, in ext4_ind_remove_space()
1402 ext4_free_branches(handle, inode, partial2->bh, in ext4_ind_remove_space()
1403 (__le32 *)partial2->bh->b_data, in ext4_ind_remove_space()
1412 BUFFER_TRACE(p->bh, "call brelse"); in ext4_ind_remove_space()
1413 brelse(p->bh); in ext4_ind_remove_space()
1417 BUFFER_TRACE(p2->bh, "call brelse"); in ext4_ind_remove_space()
1418 brelse(p2->bh); in ext4_ind_remove_space()