Lines Matching refs:bp

251 	struct xfs_buf		*bp)  in xfs_attr3_leaf_verify()  argument
253 struct xfs_mount *mp = bp->b_target->bt_mount; in xfs_attr3_leaf_verify()
254 struct xfs_attr_leafblock *leaf = bp->b_addr; in xfs_attr3_leaf_verify()
260 struct xfs_da3_node_hdr *hdr3 = bp->b_addr; in xfs_attr3_leaf_verify()
267 if (be64_to_cpu(hdr3->info.blkno) != bp->b_bn) in xfs_attr3_leaf_verify()
284 struct xfs_buf *bp) in xfs_attr3_leaf_write_verify() argument
286 struct xfs_mount *mp = bp->b_target->bt_mount; in xfs_attr3_leaf_write_verify()
287 struct xfs_buf_log_item *bip = bp->b_fspriv; in xfs_attr3_leaf_write_verify()
288 struct xfs_attr3_leaf_hdr *hdr3 = bp->b_addr; in xfs_attr3_leaf_write_verify()
290 if (!xfs_attr3_leaf_verify(bp)) { in xfs_attr3_leaf_write_verify()
291 xfs_buf_ioerror(bp, -EFSCORRUPTED); in xfs_attr3_leaf_write_verify()
292 xfs_verifier_error(bp); in xfs_attr3_leaf_write_verify()
302 xfs_buf_update_cksum(bp, XFS_ATTR3_LEAF_CRC_OFF); in xfs_attr3_leaf_write_verify()
313 struct xfs_buf *bp) in xfs_attr3_leaf_read_verify() argument
315 struct xfs_mount *mp = bp->b_target->bt_mount; in xfs_attr3_leaf_read_verify()
318 !xfs_buf_verify_cksum(bp, XFS_ATTR3_LEAF_CRC_OFF)) in xfs_attr3_leaf_read_verify()
319 xfs_buf_ioerror(bp, -EFSBADCRC); in xfs_attr3_leaf_read_verify()
320 else if (!xfs_attr3_leaf_verify(bp)) in xfs_attr3_leaf_read_verify()
321 xfs_buf_ioerror(bp, -EFSCORRUPTED); in xfs_attr3_leaf_read_verify()
323 if (bp->b_error) in xfs_attr3_leaf_read_verify()
324 xfs_verifier_error(bp); in xfs_attr3_leaf_read_verify()
744 struct xfs_buf *bp; in xfs_attr_shortform_to_leaf() local
761 bp = NULL; in xfs_attr_shortform_to_leaf()
776 error = xfs_attr3_leaf_create(args, blkno, &bp); in xfs_attr_shortform_to_leaf()
778 error = xfs_da_shrink_inode(args, 0, bp); in xfs_attr_shortform_to_leaf()
779 bp = NULL; in xfs_attr_shortform_to_leaf()
806 error = xfs_attr3_leaf_lookup_int(bp, &nargs); /* set a->index */ in xfs_attr_shortform_to_leaf()
808 error = xfs_attr3_leaf_add(bp, &nargs); in xfs_attr_shortform_to_leaf()
827 struct xfs_buf *bp, in xfs_attr_shortform_allfit() argument
836 struct xfs_mount *mp = bp->b_target->bt_mount; in xfs_attr_shortform_allfit()
838 leaf = bp->b_addr; in xfs_attr_shortform_allfit()
869 struct xfs_buf *bp, in xfs_attr3_leaf_to_shortform() argument
889 memcpy(tmpbuffer, bp->b_addr, args->geo->blksize); in xfs_attr3_leaf_to_shortform()
896 memset(bp->b_addr, 0, args->geo->blksize); in xfs_attr3_leaf_to_shortform()
901 error = xfs_da_shrink_inode(args, 0, bp); in xfs_attr3_leaf_to_shortform()
1035 struct xfs_buf *bp; in xfs_attr3_leaf_create() local
1040 error = xfs_da_get_buf(args->trans, args->dp, blkno, -1, &bp, in xfs_attr3_leaf_create()
1044 bp->b_ops = &xfs_attr3_leaf_buf_ops; in xfs_attr3_leaf_create()
1045 xfs_trans_buf_set_type(args->trans, bp, XFS_BLFT_ATTR_LEAF_BUF); in xfs_attr3_leaf_create()
1046 leaf = bp->b_addr; in xfs_attr3_leaf_create()
1053 struct xfs_da3_blkinfo *hdr3 = bp->b_addr; in xfs_attr3_leaf_create()
1057 hdr3->blkno = cpu_to_be64(bp->b_bn); in xfs_attr3_leaf_create()
1069 xfs_trans_log_buf(args->trans, bp, 0, args->geo->blksize - 1); in xfs_attr3_leaf_create()
1071 *bpp = bp; in xfs_attr3_leaf_create()
1096 error = xfs_attr3_leaf_create(state->args, blkno, &newblk->bp); in xfs_attr3_leaf_split()
1120 error = xfs_attr3_leaf_add(oldblk->bp, state->args); in xfs_attr3_leaf_split()
1123 error = xfs_attr3_leaf_add(newblk->bp, state->args); in xfs_attr3_leaf_split()
1129 oldblk->hashval = xfs_attr_leaf_lasthash(oldblk->bp, NULL); in xfs_attr3_leaf_split()
1130 newblk->hashval = xfs_attr_leaf_lasthash(newblk->bp, NULL); in xfs_attr3_leaf_split()
1139 struct xfs_buf *bp, in xfs_attr3_leaf_add() argument
1152 leaf = bp->b_addr; in xfs_attr3_leaf_add()
1174 tmp = xfs_attr3_leaf_add_work(bp, &ichdr, args, i); in xfs_attr3_leaf_add()
1192 xfs_attr3_leaf_compact(args, &ichdr, bp); in xfs_attr3_leaf_add()
1203 tmp = xfs_attr3_leaf_add_work(bp, &ichdr, args, 0); in xfs_attr3_leaf_add()
1207 xfs_trans_log_buf(args->trans, bp, in xfs_attr3_leaf_add()
1218 struct xfs_buf *bp, in xfs_attr3_leaf_add_work() argument
1233 leaf = bp->b_addr; in xfs_attr3_leaf_add_work()
1245 xfs_trans_log_buf(args->trans, bp, in xfs_attr3_leaf_add_work()
1275 xfs_trans_log_buf(args->trans, bp, in xfs_attr3_leaf_add_work()
1308 xfs_trans_log_buf(args->trans, bp, in xfs_attr3_leaf_add_work()
1340 struct xfs_buf *bp) in xfs_attr3_leaf_compact() argument
1351 memcpy(tmpbuffer, bp->b_addr, args->geo->blksize); in xfs_attr3_leaf_compact()
1352 memset(bp->b_addr, 0, args->geo->blksize); in xfs_attr3_leaf_compact()
1354 leaf_dst = bp->b_addr; in xfs_attr3_leaf_compact()
1361 memcpy(bp->b_addr, tmpbuffer, xfs_attr3_leaf_hdr_size(leaf_src)); in xfs_attr3_leaf_compact()
1386 xfs_trans_log_buf(trans, bp, 0, args->geo->blksize - 1); in xfs_attr3_leaf_compact()
1467 leaf1 = blk1->bp->b_addr; in xfs_attr3_leaf_rebalance()
1468 leaf2 = blk2->bp->b_addr; in xfs_attr3_leaf_rebalance()
1483 if (xfs_attr3_leaf_order(blk1->bp, &ichdr1, blk2->bp, &ichdr2)) { in xfs_attr3_leaf_rebalance()
1496 leaf1 = blk1->bp->b_addr; in xfs_attr3_leaf_rebalance()
1497 leaf2 = blk2->bp->b_addr; in xfs_attr3_leaf_rebalance()
1533 xfs_attr3_leaf_compact(args, &ichdr2, blk2->bp); in xfs_attr3_leaf_rebalance()
1562 xfs_attr3_leaf_compact(args, &ichdr1, blk1->bp); in xfs_attr3_leaf_rebalance()
1573 xfs_trans_log_buf(args->trans, blk1->bp, 0, args->geo->blksize - 1); in xfs_attr3_leaf_rebalance()
1574 xfs_trans_log_buf(args->trans, blk2->bp, 0, args->geo->blksize - 1); in xfs_attr3_leaf_rebalance()
1650 struct xfs_attr_leafblock *leaf1 = blk1->bp->b_addr; in xfs_attr3_leaf_figure_balance()
1651 struct xfs_attr_leafblock *leaf2 = blk2->bp->b_addr; in xfs_attr3_leaf_figure_balance()
1748 struct xfs_buf *bp; in xfs_attr3_leaf_toosmall() local
1764 leaf = blk->bp->b_addr; in xfs_attr3_leaf_toosmall()
1817 blkno, -1, &bp); in xfs_attr3_leaf_toosmall()
1821 xfs_attr3_leaf_hdr_from_disk(state->args->geo, &ichdr2, bp->b_addr); in xfs_attr3_leaf_toosmall()
1830 xfs_trans_brelse(state->args->trans, bp); in xfs_attr3_leaf_toosmall()
1869 struct xfs_buf *bp, in xfs_attr3_leaf_remove() argument
1885 leaf = bp->b_addr; in xfs_attr3_leaf_remove()
1969 xfs_trans_log_buf(args->trans, bp, in xfs_attr3_leaf_remove()
1976 xfs_trans_log_buf(args->trans, bp, in xfs_attr3_leaf_remove()
2004 xfs_trans_log_buf(args->trans, bp, in xfs_attr3_leaf_remove()
2027 struct xfs_attr_leafblock *drop_leaf = drop_blk->bp->b_addr; in xfs_attr3_leaf_unbalance()
2028 struct xfs_attr_leafblock *save_leaf = save_blk->bp->b_addr; in xfs_attr3_leaf_unbalance()
2035 drop_leaf = drop_blk->bp->b_addr; in xfs_attr3_leaf_unbalance()
2036 save_leaf = save_blk->bp->b_addr; in xfs_attr3_leaf_unbalance()
2056 if (xfs_attr3_leaf_order(save_blk->bp, &savehdr, in xfs_attr3_leaf_unbalance()
2057 drop_blk->bp, &drophdr)) { in xfs_attr3_leaf_unbalance()
2094 if (xfs_attr3_leaf_order(save_blk->bp, &savehdr, in xfs_attr3_leaf_unbalance()
2095 drop_blk->bp, &drophdr)) { in xfs_attr3_leaf_unbalance()
2120 xfs_trans_log_buf(state->args->trans, save_blk->bp, 0, in xfs_attr3_leaf_unbalance()
2149 struct xfs_buf *bp, in xfs_attr3_leaf_lookup_int() argument
2164 leaf = bp->b_addr; in xfs_attr3_leaf_lookup_int()
2259 struct xfs_buf *bp, in xfs_attr3_leaf_getvalue() argument
2269 leaf = bp->b_addr; in xfs_attr3_leaf_getvalue()
2466 struct xfs_buf *bp, in xfs_attr_leaf_lasthash() argument
2471 struct xfs_mount *mp = bp->b_target->bt_mount; in xfs_attr_leaf_lasthash()
2473 xfs_attr3_leaf_hdr_from_disk(mp->m_attr_geo, &ichdr, bp->b_addr); in xfs_attr_leaf_lasthash()
2474 entries = xfs_attr3_leaf_entryp(bp->b_addr); in xfs_attr_leaf_lasthash()
2545 struct xfs_buf *bp; in xfs_attr3_leaf_clearflag() local
2558 error = xfs_attr3_leaf_read(args->trans, args->dp, args->blkno, -1, &bp); in xfs_attr3_leaf_clearflag()
2562 leaf = bp->b_addr; in xfs_attr3_leaf_clearflag()
2586 xfs_trans_log_buf(args->trans, bp, in xfs_attr3_leaf_clearflag()
2594 xfs_trans_log_buf(args->trans, bp, in xfs_attr3_leaf_clearflag()
2614 struct xfs_buf *bp; in xfs_attr3_leaf_setflag() local
2625 error = xfs_attr3_leaf_read(args->trans, args->dp, args->blkno, -1, &bp); in xfs_attr3_leaf_setflag()
2629 leaf = bp->b_addr; in xfs_attr3_leaf_setflag()
2639 xfs_trans_log_buf(args->trans, bp, in xfs_attr3_leaf_setflag()
2645 xfs_trans_log_buf(args->trans, bp, in xfs_attr3_leaf_setflag()