Lines Matching refs:bp
69 static void xfs_dir2_free_log_header(xfs_trans_t *tp, xfs_dabuf_t *bp);
70 static int xfs_dir2_leafn_add(xfs_dabuf_t *bp, xfs_da_args_t *args, int index);
72 static void xfs_dir2_leafn_check(xfs_inode_t *dp, xfs_dabuf_t *bp);
74 #define xfs_dir2_leafn_check(dp, bp) argument
82 static int xfs_dir2_leafn_remove(xfs_da_args_t *args, xfs_dabuf_t *bp,
94 xfs_dabuf_t *bp, /* freespace buffer */ in xfs_dir2_free_log_bests() argument
100 free = bp->data; in xfs_dir2_free_log_bests()
102 xfs_da_log_buf(tp, bp, in xfs_dir2_free_log_bests()
114 xfs_dabuf_t *bp) /* freespace buffer */ in xfs_dir2_free_log_header() argument
118 free = bp->data; in xfs_dir2_free_log_header()
120 xfs_da_log_buf(tp, bp, (uint)((char *)&free->hdr - (char *)free), in xfs_dir2_free_log_header()
207 xfs_dabuf_t *bp, /* leaf buffer */ in xfs_dir2_leafn_add() argument
222 xfs_dir2_trace_args_sb("leafn_add", args, index, bp); in xfs_dir2_leafn_add()
226 leaf = bp->data; in xfs_dir2_leafn_add()
260 xfs_dir2_leaf_compact_x1(bp, &index, &lowstale, &highstale, in xfs_dir2_leafn_add()
355 xfs_dir2_leaf_log_header(tp, bp); in xfs_dir2_leafn_add()
356 xfs_dir2_leaf_log_ents(tp, bp, lfloglow, lfloghigh); in xfs_dir2_leafn_add()
357 xfs_dir2_leafn_check(dp, bp); in xfs_dir2_leafn_add()
368 xfs_dabuf_t *bp) /* leaf buffer */ in xfs_dir2_leafn_check() argument
375 leaf = bp->data; in xfs_dir2_leafn_check()
397 xfs_dabuf_t *bp, /* leaf buffer */ in xfs_dir2_leafn_lasthash() argument
402 leaf = bp->data; in xfs_dir2_leafn_lasthash()
418 xfs_dabuf_t *bp, /* leaf buffer */ in xfs_dir2_leafn_lookup_int() argument
443 leaf = bp->data; in xfs_dir2_leafn_lookup_int()
448 xfs_dir2_leafn_check(dp, bp); in xfs_dir2_leafn_lookup_int()
452 index = xfs_dir2_leaf_search_hash(args, bp); in xfs_dir2_leafn_lookup_int()
457 curbp = state->extrablk.bp; in xfs_dir2_leafn_lookup_int()
556 state->extrablk.bp = curbp; in xfs_dir2_leafn_lookup_int()
607 state->extrablk.bp = curbp; in xfs_dir2_leafn_lookup_int()
623 state->extrablk.bp = curbp; in xfs_dir2_leafn_lookup_int()
784 if ((swap = xfs_dir2_leafn_order(blk1->bp, blk2->bp))) { in xfs_dir2_leafn_rebalance()
791 leaf1 = blk1->bp->data; in xfs_dir2_leafn_rebalance()
792 leaf2 = blk2->bp->data; in xfs_dir2_leafn_rebalance()
824 xfs_dir2_leafn_moveents(args, blk1->bp, in xfs_dir2_leafn_rebalance()
825 INT_GET(leaf1->hdr.count, ARCH_CONVERT) - count, blk2->bp, 0, count); in xfs_dir2_leafn_rebalance()
827 xfs_dir2_leafn_moveents(args, blk2->bp, 0, blk1->bp, in xfs_dir2_leafn_rebalance()
868 xfs_dabuf_t *bp, /* leaf buffer */ in xfs_dir2_leafn_remove() argument
887 xfs_dir2_trace_args_sb("leafn_remove", args, index, bp); in xfs_dir2_leafn_remove()
891 leaf = bp->data; in xfs_dir2_leafn_remove()
909 xfs_dir2_leaf_log_header(tp, bp); in xfs_dir2_leafn_remove()
911 xfs_dir2_leaf_log_ents(tp, bp, index, index); in xfs_dir2_leafn_remove()
916 dbp = dblk->bp; in xfs_dir2_leafn_remove()
973 dblk->bp = NULL; in xfs_dir2_leafn_remove()
1056 xfs_dir2_leafn_check(dp, bp); in xfs_dir2_leafn_remove()
1098 &newblk->bp, XFS_DIR2_LEAFN_MAGIC); in xfs_dir2_leafn_split()
1117 error = xfs_dir2_leafn_add(oldblk->bp, args, oldblk->index); in xfs_dir2_leafn_split()
1119 error = xfs_dir2_leafn_add(newblk->bp, args, newblk->index); in xfs_dir2_leafn_split()
1123 oldblk->hashval = xfs_dir2_leafn_lasthash(oldblk->bp, NULL); in xfs_dir2_leafn_split()
1124 newblk->hashval = xfs_dir2_leafn_lasthash(newblk->bp, NULL); in xfs_dir2_leafn_split()
1125 xfs_dir2_leafn_check(args->dp, oldblk->bp); in xfs_dir2_leafn_split()
1126 xfs_dir2_leafn_check(args->dp, newblk->bp); in xfs_dir2_leafn_split()
1146 xfs_dabuf_t *bp; /* leaf buffer */ in xfs_dir2_leafn_toosmall() local
1162 info = blk->bp->data; in xfs_dir2_leafn_toosmall()
1202 for (i = 0, bp = NULL; i < 2; forward = !forward, i++) { in xfs_dir2_leafn_toosmall()
1211 -1, &bp, XFS_DATA_FORK))) { in xfs_dir2_leafn_toosmall()
1214 ASSERT(bp != NULL); in xfs_dir2_leafn_toosmall()
1221 leaf = bp->data; in xfs_dir2_leafn_toosmall()
1230 xfs_da_brelse(state->args->trans, bp); in xfs_dir2_leafn_toosmall()
1243 xfs_da_buf_done(bp); in xfs_dir2_leafn_toosmall()
1279 drop_leaf = drop_blk->bp->data; in xfs_dir2_leafn_unbalance()
1280 save_leaf = save_blk->bp->data; in xfs_dir2_leafn_unbalance()
1288 xfs_dir2_leaf_compact(args, drop_blk->bp); in xfs_dir2_leafn_unbalance()
1290 xfs_dir2_leaf_compact(args, save_blk->bp); in xfs_dir2_leafn_unbalance()
1295 if (xfs_dir2_leafn_order(save_blk->bp, drop_blk->bp)) in xfs_dir2_leafn_unbalance()
1296 xfs_dir2_leafn_moveents(args, drop_blk->bp, 0, save_blk->bp, 0, in xfs_dir2_leafn_unbalance()
1299 xfs_dir2_leafn_moveents(args, drop_blk->bp, 0, save_blk->bp, in xfs_dir2_leafn_unbalance()
1302 xfs_dir2_leafn_check(args->dp, save_blk->bp); in xfs_dir2_leafn_unbalance()
1350 rval = xfs_dir2_leafn_add(blk->bp, args, blk->index); in xfs_dir2_node_addname()
1416 fbp = fblk->bp; in xfs_dir2_node_addname_int()
1525 if (fblk && fblk->bp) in xfs_dir2_node_addname_int()
1526 fblk->bp = NULL; in xfs_dir2_node_addname_int()
1543 if ((fblk == NULL || fblk->bp == NULL) && fbp != NULL) in xfs_dir2_node_addname_int()
1558 if ((fblk == NULL || fblk->bp == NULL) && fbp != NULL) in xfs_dir2_node_addname_int()
1567 if (fblk && fblk->bp) in xfs_dir2_node_addname_int()
1568 fblk->bp = NULL; in xfs_dir2_node_addname_int()
1685 if ((fblk == NULL || fblk->bp == NULL) && fbp != NULL) in xfs_dir2_node_addname_int()
1695 if ((fblk == NULL || fblk->bp == NULL) && fbp != NULL) in xfs_dir2_node_addname_int()
1750 if ((fblk == NULL || fblk->bp == NULL) && fbp != NULL) in xfs_dir2_node_addname_int()
1794 xfs_da_brelse(args->trans, state->path.blk[i].bp); in xfs_dir2_node_lookup()
1795 state->path.blk[i].bp = NULL; in xfs_dir2_node_lookup()
1800 if (state->extravalid && state->extrablk.bp) { in xfs_dir2_node_lookup()
1801 xfs_da_brelse(args->trans, state->extrablk.bp); in xfs_dir2_node_lookup()
1802 state->extrablk.bp = NULL; in xfs_dir2_node_lookup()
1850 error = xfs_dir2_leafn_remove(args, blk->bp, blk->index, in xfs_dir2_node_removename()
1918 leaf = blk->bp->data; in xfs_dir2_node_replace()
1924 data = state->extrablk.bp->data; in xfs_dir2_node_replace()
1934 xfs_dir2_data_log_entry(args->trans, state->extrablk.bp, dep); in xfs_dir2_node_replace()
1941 xfs_da_brelse(args->trans, state->extrablk.bp); in xfs_dir2_node_replace()
1942 state->extrablk.bp = NULL; in xfs_dir2_node_replace()
1948 xfs_da_brelse(args->trans, state->path.blk[i].bp); in xfs_dir2_node_replace()
1949 state->path.blk[i].bp = NULL; in xfs_dir2_node_replace()
1965 xfs_dabuf_t *bp; /* freespace buffer */ in xfs_dir2_node_trim_free() local
1978 if (unlikely(error = xfs_da_read_buf(tp, dp, (xfs_dablk_t)fo, -2, &bp, in xfs_dir2_node_trim_free()
1987 if (bp == NULL) { in xfs_dir2_node_trim_free()
1990 free = bp->data; in xfs_dir2_node_trim_free()
1996 xfs_da_brelse(tp, bp); in xfs_dir2_node_trim_free()
2005 bp))) { in xfs_dir2_node_trim_free()
2012 xfs_da_brelse(tp, bp); in xfs_dir2_node_trim_free()