Lines Matching refs:bp

113 STATIC uint	xfs_da_node_lasthash(xfs_dabuf_t *bp, int *count);
130 xfs_dabuf_t *bp; in xfs_da_node_create() local
135 error = xfs_da_get_buf(tp, args->dp, blkno, -1, &bp, whichfork); in xfs_da_node_create()
138 ASSERT(bp != NULL); in xfs_da_node_create()
139 node = bp->data; in xfs_da_node_create()
147 xfs_da_log_buf(tp, bp, in xfs_da_node_create()
150 *bpp = bp; in xfs_da_node_create()
163 xfs_dabuf_t *bp; in xfs_da_split() local
259 xfs_da_buf_done(addblk->bp); in xfs_da_split()
260 addblk->bp = NULL; in xfs_da_split()
283 xfs_da_buf_done(oldblk->bp); in xfs_da_split()
295 xfs_da_buf_done(oldblk->bp); in xfs_da_split()
296 xfs_da_buf_done(addblk->bp); in xfs_da_split()
297 addblk->bp = NULL; in xfs_da_split()
308 node = oldblk->bp->data; in xfs_da_split()
311 bp = addblk->bp; in xfs_da_split()
314 bp = state->extrablk.bp; in xfs_da_split()
316 node = bp->data; in xfs_da_split()
318 xfs_da_log_buf(state->args->trans, bp, in xfs_da_split()
322 node = oldblk->bp->data; in xfs_da_split()
325 bp = addblk->bp; in xfs_da_split()
328 bp = state->extrablk.bp; in xfs_da_split()
330 node = bp->data; in xfs_da_split()
332 xfs_da_log_buf(state->args->trans, bp, in xfs_da_split()
336 xfs_da_buf_done(oldblk->bp); in xfs_da_split()
337 xfs_da_buf_done(addblk->bp); in xfs_da_split()
338 addblk->bp = NULL; in xfs_da_split()
354 xfs_dabuf_t *bp; in xfs_da_root_split() local
373 error = xfs_da_get_buf(tp, dp, blkno, -1, &bp, args->whichfork); in xfs_da_root_split()
376 ASSERT(bp != NULL); in xfs_da_root_split()
377 node = bp->data; in xfs_da_root_split()
378 oldroot = blk1->bp->data; in xfs_da_root_split()
390 xfs_da_log_buf(tp, bp, 0, size - 1); in xfs_da_root_split()
391 xfs_da_buf_done(blk1->bp); in xfs_da_root_split()
392 blk1->bp = bp; in xfs_da_root_split()
401 INT_GET(node->hdr.level, ARCH_CONVERT) + 1, &bp, args->whichfork); in xfs_da_root_split()
404 node = bp->data; in xfs_da_root_split()
421 xfs_da_log_buf(tp, bp, in xfs_da_root_split()
424 xfs_da_buf_done(bp); in xfs_da_root_split()
443 node = oldblk->bp->data; in xfs_da_node_split()
464 &newblk->bp, state->args->whichfork); in xfs_da_node_split()
490 node = oldblk->bp->data; in xfs_da_node_split()
529 node1 = blk1->bp->data; in xfs_da_node_rebalance()
530 node2 = blk2->bp->data; in xfs_da_node_rebalance()
585 xfs_da_log_buf(tp, blk1->bp, in xfs_da_node_rebalance()
602 xfs_da_log_buf(tp, blk1->bp, in xfs_da_node_rebalance()
604 xfs_da_log_buf(tp, blk2->bp, in xfs_da_node_rebalance()
613 node1 = blk1->bp->data; in xfs_da_node_rebalance()
614 node2 = blk2->bp->data; in xfs_da_node_rebalance()
639 node = oldblk->bp->data; in xfs_da_node_add()
659 xfs_da_log_buf(state->args->trans, oldblk->bp, in xfs_da_node_add()
662 xfs_da_log_buf(state->args->trans, oldblk->bp, in xfs_da_node_add()
758 drop_blk->bp); in xfs_da_join()
759 drop_blk->bp = NULL; in xfs_da_join()
786 xfs_dabuf_t *bp; in xfs_da_root_join() local
792 oldroot = root_blk->bp->data; in xfs_da_root_join()
809 error = xfs_da_read_buf(args->trans, args->dp, child, -1, &bp, in xfs_da_root_join()
813 ASSERT(bp != NULL); in xfs_da_root_join()
814 blkinfo = bp->data; in xfs_da_root_join()
823 memcpy(root_blk->bp->data, bp->data, state->blocksize); in xfs_da_root_join()
824 xfs_da_log_buf(args->trans, root_blk->bp, 0, state->blocksize - 1); in xfs_da_root_join()
825 error = xfs_da_shrink_inode(args, child, bp); in xfs_da_root_join()
846 xfs_dabuf_t *bp; in xfs_da_node_toosmall() local
854 info = blk->bp->data; in xfs_da_node_toosmall()
906 blkno, -1, &bp, state->args->whichfork); in xfs_da_node_toosmall()
909 ASSERT(bp != NULL); in xfs_da_node_toosmall()
915 node = bp->data; in xfs_da_node_toosmall()
918 xfs_da_brelse(state->args->trans, bp); in xfs_da_node_toosmall()
975 lasthash = xfs_attr_leaf_lasthash(blk->bp, &count); in xfs_da_fixhashpath()
982 lasthash = xfs_dir_leaf_lasthash(blk->bp, &count); in xfs_da_fixhashpath()
988 lasthash = xfs_dir2_leafn_lasthash(blk->bp, &count); in xfs_da_fixhashpath()
993 lasthash = xfs_da_node_lasthash(blk->bp, &count); in xfs_da_fixhashpath()
999 node = blk->bp->data; in xfs_da_fixhashpath()
1006 xfs_da_log_buf(state->args->trans, blk->bp, in xfs_da_fixhashpath()
1023 node = drop_blk->bp->data; in xfs_da_node_remove()
1035 xfs_da_log_buf(state->args->trans, drop_blk->bp, in xfs_da_node_remove()
1040 xfs_da_log_buf(state->args->trans, drop_blk->bp, in xfs_da_node_remove()
1043 xfs_da_log_buf(state->args->trans, drop_blk->bp, in xfs_da_node_remove()
1066 drop_node = drop_blk->bp->data; in xfs_da_node_unbalance()
1067 save_node = save_blk->bp->data; in xfs_da_node_unbalance()
1084 xfs_da_log_buf(tp, save_blk->bp, in xfs_da_node_unbalance()
1090 xfs_da_log_buf(tp, save_blk->bp, in xfs_da_node_unbalance()
1103 xfs_da_log_buf(tp, save_blk->bp, in xfs_da_node_unbalance()
1158 -1, &blk->bp, args->whichfork); in xfs_da_node_lookup_int()
1164 curr = blk->bp->data; in xfs_da_node_lookup_int()
1174 node = blk->bp->data; in xfs_da_node_lookup_int()
1222 blk->hashval = xfs_attr_leaf_lasthash(blk->bp, NULL); in xfs_da_node_lookup_int()
1227 blk->hashval = xfs_dir_leaf_lasthash(blk->bp, NULL); in xfs_da_node_lookup_int()
1231 blk->hashval = xfs_dir2_leafn_lasthash(blk->bp, NULL); in xfs_da_node_lookup_int()
1245 retval = xfs_dir_leaf_lookup_int(blk->bp, args, in xfs_da_node_lookup_int()
1249 retval = xfs_dir2_leafn_lookup_int(blk->bp, args, in xfs_da_node_lookup_int()
1254 retval = xfs_attr_leaf_lookup_int(blk->bp, args); in xfs_da_node_lookup_int()
1295 xfs_dabuf_t *bp; in xfs_da_blk_link() local
1302 old_info = old_blk->bp->data; in xfs_da_blk_link()
1303 new_info = new_blk->bp->data; in xfs_da_blk_link()
1314 before = xfs_attr_leaf_order(old_blk->bp, new_blk->bp); in xfs_da_blk_link()
1319 before = xfs_dir_leaf_order(old_blk->bp, new_blk->bp); in xfs_da_blk_link()
1323 before = xfs_dir2_leafn_order(old_blk->bp, new_blk->bp); in xfs_da_blk_link()
1326 before = xfs_da_node_order(old_blk->bp, new_blk->bp); in xfs_da_blk_link()
1342 ARCH_CONVERT), -1, &bp, in xfs_da_blk_link()
1346 ASSERT(bp != NULL); in xfs_da_blk_link()
1347 tmp_info = bp->data; in xfs_da_blk_link()
1351 xfs_da_log_buf(args->trans, bp, 0, sizeof(*tmp_info)-1); in xfs_da_blk_link()
1352 xfs_da_buf_done(bp); in xfs_da_blk_link()
1363 INT_GET(old_info->forw, ARCH_CONVERT), -1, &bp, in xfs_da_blk_link()
1367 ASSERT(bp != NULL); in xfs_da_blk_link()
1368 tmp_info = bp->data; in xfs_da_blk_link()
1374 xfs_da_log_buf(args->trans, bp, 0, sizeof(*tmp_info)-1); in xfs_da_blk_link()
1375 xfs_da_buf_done(bp); in xfs_da_blk_link()
1380 xfs_da_log_buf(args->trans, old_blk->bp, 0, sizeof(*tmp_info) - 1); in xfs_da_blk_link()
1381 xfs_da_log_buf(args->trans, new_blk->bp, 0, sizeof(*tmp_info) - 1); in xfs_da_blk_link()
1411 xfs_da_node_lasthash(xfs_dabuf_t *bp, int *count) in xfs_da_node_lasthash() argument
1415 node = bp->data; in xfs_da_node_lasthash()
1433 xfs_dabuf_t *bp; in xfs_da_blk_unlink() local
1441 save_info = save_blk->bp->data; in xfs_da_blk_unlink()
1442 drop_info = drop_blk->bp->data; in xfs_da_blk_unlink()
1462 ARCH_CONVERT), -1, &bp, in xfs_da_blk_unlink()
1466 ASSERT(bp != NULL); in xfs_da_blk_unlink()
1467 tmp_info = bp->data; in xfs_da_blk_unlink()
1471 xfs_da_log_buf(args->trans, bp, 0, in xfs_da_blk_unlink()
1473 xfs_da_buf_done(bp); in xfs_da_blk_unlink()
1479 INT_GET(drop_info->forw, ARCH_CONVERT), -1, &bp, in xfs_da_blk_unlink()
1483 ASSERT(bp != NULL); in xfs_da_blk_unlink()
1484 tmp_info = bp->data; in xfs_da_blk_unlink()
1490 xfs_da_log_buf(args->trans, bp, 0, in xfs_da_blk_unlink()
1492 xfs_da_buf_done(bp); in xfs_da_blk_unlink()
1496 xfs_da_log_buf(args->trans, save_blk->bp, 0, sizeof(*save_info) - 1); in xfs_da_blk_unlink()
1530 ASSERT(blk->bp != NULL); in xfs_da_path_shift()
1531 node = blk->bp->data; in xfs_da_path_shift()
1559 xfs_da_brelse(args->trans, blk->bp); in xfs_da_path_shift()
1566 &blk->bp, args->whichfork); in xfs_da_path_shift()
1569 ASSERT(blk->bp != NULL); in xfs_da_path_shift()
1570 info = blk->bp->data; in xfs_da_path_shift()
1589 blk->hashval = xfs_attr_leaf_lasthash(blk->bp, in xfs_da_path_shift()
1595 blk->hashval = xfs_dir_leaf_lasthash(blk->bp, in xfs_da_path_shift()
1600 blk->hashval = xfs_dir2_leafn_lasthash(blk->bp, in xfs_da_path_shift()
2095 xfs_buf_t *bp = NULL; in xfs_da_do_buf() local
2197 bp = xfs_trans_get_buf(trans, mp->m_ddev_targp, in xfs_da_do_buf()
2199 error = bp ? XFS_BUF_GETERROR(bp) : XFS_ERROR(EIO); in xfs_da_do_buf()
2205 bp = NULL; in xfs_da_do_buf()
2207 mappedbno, nmapped, 0, &bp); in xfs_da_do_buf()
2213 bp = NULL; in xfs_da_do_buf()
2218 if (bp) in xfs_da_do_buf()
2219 xfs_trans_brelse(trans, bp); in xfs_da_do_buf()
2222 if (!bp) in xfs_da_do_buf()
2226 XFS_BUF_SET_VTYPE_REF(bp, B_FS_ATTR_BTREE, in xfs_da_do_buf()
2229 XFS_BUF_SET_VTYPE_REF(bp, B_FS_DIR_BTREE, in xfs_da_do_buf()
2234 bplist[nbplist++] = bp; in xfs_da_do_buf()
2242 } else if (bp) in xfs_da_do_buf()
2243 rbp = xfs_da_buf_make(1, &bp, ra); in xfs_da_do_buf()
2392 if (state->altpath.blk[i].bp) { in xfs_da_state_kill_altpath()
2393 if (state->altpath.blk[i].bp != state->path.blk[i].bp) in xfs_da_state_kill_altpath()
2394 xfs_da_buf_done(state->altpath.blk[i].bp); in xfs_da_state_kill_altpath()
2395 state->altpath.blk[i].bp = NULL; in xfs_da_state_kill_altpath()
2411 if (state->path.blk[i].bp) in xfs_da_state_free()
2412 xfs_da_buf_done(state->path.blk[i].bp); in xfs_da_state_free()
2414 if (state->extravalid && state->extrablk.bp) in xfs_da_state_free()
2415 xfs_da_buf_done(state->extrablk.bp); in xfs_da_state_free()
2434 xfs_buf_t *bp; in xfs_da_buf_make() local
2451 bp = bps[0]; in xfs_da_buf_make()
2452 dabuf->bbcount = (short)BTOBB(XFS_BUF_COUNT(bp)); in xfs_da_buf_make()
2453 dabuf->data = XFS_BUF_PTR(bp); in xfs_da_buf_make()
2454 dabuf->bps[0] = bp; in xfs_da_buf_make()
2458 dabuf->bps[i] = bp = bps[i]; in xfs_da_buf_make()
2459 dabuf->bbcount += BTOBB(XFS_BUF_COUNT(bp)); in xfs_da_buf_make()
2462 for (i = off = 0; i < nbuf; i++, off += XFS_BUF_COUNT(bp)) { in xfs_da_buf_make()
2463 bp = bps[i]; in xfs_da_buf_make()
2464 memcpy((char *)dabuf->data + off, XFS_BUF_PTR(bp), in xfs_da_buf_make()
2465 XFS_BUF_COUNT(bp)); in xfs_da_buf_make()
2495 xfs_buf_t *bp; in xfs_da_buf_clean() local
2503 i++, off += XFS_BUF_COUNT(bp)) { in xfs_da_buf_clean()
2504 bp = dabuf->bps[i]; in xfs_da_buf_clean()
2505 memcpy(XFS_BUF_PTR(bp), (char *)dabuf->data + off, in xfs_da_buf_clean()
2506 XFS_BUF_COUNT(bp)); in xfs_da_buf_clean()
2550 xfs_buf_t *bp; in xfs_da_log_buf() local
2564 for (i = off = 0; i < dabuf->nbuf; i++, off += XFS_BUF_COUNT(bp)) { in xfs_da_log_buf()
2565 bp = dabuf->bps[i]; in xfs_da_log_buf()
2567 l = f + XFS_BUF_COUNT(bp) - 1; in xfs_da_log_buf()
2573 xfs_trans_log_buf(tp, bp, f - off, l - off); in xfs_da_log_buf()
2581 else if (!(XFS_BUF_ISDONE(bp))) in xfs_da_log_buf()
2582 XFS_BUF_DONE(bp); in xfs_da_log_buf()
2595 xfs_buf_t *bp; in xfs_da_brelse() local
2602 bplist = &bp; in xfs_da_brelse()
2603 bp = dabuf->bps[0]; in xfs_da_brelse()
2611 if (bplist != &bp) in xfs_da_brelse()
2621 xfs_buf_t *bp; in xfs_da_binval() local
2628 bplist = &bp; in xfs_da_binval()
2629 bp = dabuf->bps[0]; in xfs_da_binval()
2637 if (bplist != &bp) in xfs_da_binval()