Lines Matching refs:bp

252 	struct xfs_buf		*bp)  in xfs_attr3_leaf_verify()  argument
254 struct xfs_mount *mp = bp->b_target->bt_mount; in xfs_attr3_leaf_verify()
255 struct xfs_attr_leafblock *leaf = bp->b_addr; in xfs_attr3_leaf_verify()
261 struct xfs_da3_node_hdr *hdr3 = bp->b_addr; in xfs_attr3_leaf_verify()
268 if (be64_to_cpu(hdr3->info.blkno) != bp->b_bn) in xfs_attr3_leaf_verify()
287 struct xfs_buf *bp) in xfs_attr3_leaf_write_verify() argument
289 struct xfs_mount *mp = bp->b_target->bt_mount; in xfs_attr3_leaf_write_verify()
290 struct xfs_buf_log_item *bip = bp->b_fspriv; in xfs_attr3_leaf_write_verify()
291 struct xfs_attr3_leaf_hdr *hdr3 = bp->b_addr; in xfs_attr3_leaf_write_verify()
293 if (!xfs_attr3_leaf_verify(bp)) { in xfs_attr3_leaf_write_verify()
294 xfs_buf_ioerror(bp, -EFSCORRUPTED); in xfs_attr3_leaf_write_verify()
295 xfs_verifier_error(bp); in xfs_attr3_leaf_write_verify()
305 xfs_buf_update_cksum(bp, XFS_ATTR3_LEAF_CRC_OFF); in xfs_attr3_leaf_write_verify()
316 struct xfs_buf *bp) in xfs_attr3_leaf_read_verify() argument
318 struct xfs_mount *mp = bp->b_target->bt_mount; in xfs_attr3_leaf_read_verify()
321 !xfs_buf_verify_cksum(bp, XFS_ATTR3_LEAF_CRC_OFF)) in xfs_attr3_leaf_read_verify()
322 xfs_buf_ioerror(bp, -EFSBADCRC); in xfs_attr3_leaf_read_verify()
323 else if (!xfs_attr3_leaf_verify(bp)) in xfs_attr3_leaf_read_verify()
324 xfs_buf_ioerror(bp, -EFSCORRUPTED); in xfs_attr3_leaf_read_verify()
326 if (bp->b_error) in xfs_attr3_leaf_read_verify()
327 xfs_verifier_error(bp); in xfs_attr3_leaf_read_verify()
748 struct xfs_buf *bp; in xfs_attr_shortform_to_leaf() local
765 bp = NULL; in xfs_attr_shortform_to_leaf()
780 error = xfs_attr3_leaf_create(args, blkno, &bp); in xfs_attr_shortform_to_leaf()
782 error = xfs_da_shrink_inode(args, 0, bp); in xfs_attr_shortform_to_leaf()
783 bp = NULL; in xfs_attr_shortform_to_leaf()
810 error = xfs_attr3_leaf_lookup_int(bp, &nargs); /* set a->index */ in xfs_attr_shortform_to_leaf()
812 error = xfs_attr3_leaf_add(bp, &nargs); in xfs_attr_shortform_to_leaf()
831 struct xfs_buf *bp, in xfs_attr_shortform_allfit() argument
840 struct xfs_mount *mp = bp->b_target->bt_mount; in xfs_attr_shortform_allfit()
842 leaf = bp->b_addr; in xfs_attr_shortform_allfit()
873 struct xfs_buf *bp, in xfs_attr3_leaf_to_shortform() argument
893 memcpy(tmpbuffer, bp->b_addr, args->geo->blksize); in xfs_attr3_leaf_to_shortform()
900 memset(bp->b_addr, 0, args->geo->blksize); in xfs_attr3_leaf_to_shortform()
905 error = xfs_da_shrink_inode(args, 0, bp); in xfs_attr3_leaf_to_shortform()
1039 struct xfs_buf *bp; in xfs_attr3_leaf_create() local
1044 error = xfs_da_get_buf(args->trans, args->dp, blkno, -1, &bp, in xfs_attr3_leaf_create()
1048 bp->b_ops = &xfs_attr3_leaf_buf_ops; in xfs_attr3_leaf_create()
1049 xfs_trans_buf_set_type(args->trans, bp, XFS_BLFT_ATTR_LEAF_BUF); in xfs_attr3_leaf_create()
1050 leaf = bp->b_addr; in xfs_attr3_leaf_create()
1057 struct xfs_da3_blkinfo *hdr3 = bp->b_addr; in xfs_attr3_leaf_create()
1061 hdr3->blkno = cpu_to_be64(bp->b_bn); in xfs_attr3_leaf_create()
1073 xfs_trans_log_buf(args->trans, bp, 0, args->geo->blksize - 1); in xfs_attr3_leaf_create()
1075 *bpp = bp; in xfs_attr3_leaf_create()
1100 error = xfs_attr3_leaf_create(state->args, blkno, &newblk->bp); in xfs_attr3_leaf_split()
1124 error = xfs_attr3_leaf_add(oldblk->bp, state->args); in xfs_attr3_leaf_split()
1127 error = xfs_attr3_leaf_add(newblk->bp, state->args); in xfs_attr3_leaf_split()
1133 oldblk->hashval = xfs_attr_leaf_lasthash(oldblk->bp, NULL); in xfs_attr3_leaf_split()
1134 newblk->hashval = xfs_attr_leaf_lasthash(newblk->bp, NULL); in xfs_attr3_leaf_split()
1143 struct xfs_buf *bp, in xfs_attr3_leaf_add() argument
1156 leaf = bp->b_addr; in xfs_attr3_leaf_add()
1178 tmp = xfs_attr3_leaf_add_work(bp, &ichdr, args, i); in xfs_attr3_leaf_add()
1196 xfs_attr3_leaf_compact(args, &ichdr, bp); in xfs_attr3_leaf_add()
1207 tmp = xfs_attr3_leaf_add_work(bp, &ichdr, args, 0); in xfs_attr3_leaf_add()
1211 xfs_trans_log_buf(args->trans, bp, in xfs_attr3_leaf_add()
1222 struct xfs_buf *bp, in xfs_attr3_leaf_add_work() argument
1237 leaf = bp->b_addr; in xfs_attr3_leaf_add_work()
1249 xfs_trans_log_buf(args->trans, bp, in xfs_attr3_leaf_add_work()
1279 xfs_trans_log_buf(args->trans, bp, in xfs_attr3_leaf_add_work()
1312 xfs_trans_log_buf(args->trans, bp, in xfs_attr3_leaf_add_work()
1344 struct xfs_buf *bp) in xfs_attr3_leaf_compact() argument
1355 memcpy(tmpbuffer, bp->b_addr, args->geo->blksize); in xfs_attr3_leaf_compact()
1356 memset(bp->b_addr, 0, args->geo->blksize); in xfs_attr3_leaf_compact()
1358 leaf_dst = bp->b_addr; in xfs_attr3_leaf_compact()
1365 memcpy(bp->b_addr, tmpbuffer, xfs_attr3_leaf_hdr_size(leaf_src)); in xfs_attr3_leaf_compact()
1390 xfs_trans_log_buf(trans, bp, 0, args->geo->blksize - 1); in xfs_attr3_leaf_compact()
1471 leaf1 = blk1->bp->b_addr; in xfs_attr3_leaf_rebalance()
1472 leaf2 = blk2->bp->b_addr; in xfs_attr3_leaf_rebalance()
1487 if (xfs_attr3_leaf_order(blk1->bp, &ichdr1, blk2->bp, &ichdr2)) { in xfs_attr3_leaf_rebalance()
1500 leaf1 = blk1->bp->b_addr; in xfs_attr3_leaf_rebalance()
1501 leaf2 = blk2->bp->b_addr; in xfs_attr3_leaf_rebalance()
1537 xfs_attr3_leaf_compact(args, &ichdr2, blk2->bp); in xfs_attr3_leaf_rebalance()
1566 xfs_attr3_leaf_compact(args, &ichdr1, blk1->bp); in xfs_attr3_leaf_rebalance()
1577 xfs_trans_log_buf(args->trans, blk1->bp, 0, args->geo->blksize - 1); in xfs_attr3_leaf_rebalance()
1578 xfs_trans_log_buf(args->trans, blk2->bp, 0, args->geo->blksize - 1); in xfs_attr3_leaf_rebalance()
1654 struct xfs_attr_leafblock *leaf1 = blk1->bp->b_addr; in xfs_attr3_leaf_figure_balance()
1655 struct xfs_attr_leafblock *leaf2 = blk2->bp->b_addr; in xfs_attr3_leaf_figure_balance()
1752 struct xfs_buf *bp; in xfs_attr3_leaf_toosmall() local
1768 leaf = blk->bp->b_addr; in xfs_attr3_leaf_toosmall()
1821 blkno, -1, &bp); in xfs_attr3_leaf_toosmall()
1825 xfs_attr3_leaf_hdr_from_disk(state->args->geo, &ichdr2, bp->b_addr); in xfs_attr3_leaf_toosmall()
1834 xfs_trans_brelse(state->args->trans, bp); in xfs_attr3_leaf_toosmall()
1873 struct xfs_buf *bp, in xfs_attr3_leaf_remove() argument
1889 leaf = bp->b_addr; in xfs_attr3_leaf_remove()
1973 xfs_trans_log_buf(args->trans, bp, in xfs_attr3_leaf_remove()
1980 xfs_trans_log_buf(args->trans, bp, in xfs_attr3_leaf_remove()
2008 xfs_trans_log_buf(args->trans, bp, in xfs_attr3_leaf_remove()
2031 struct xfs_attr_leafblock *drop_leaf = drop_blk->bp->b_addr; in xfs_attr3_leaf_unbalance()
2032 struct xfs_attr_leafblock *save_leaf = save_blk->bp->b_addr; in xfs_attr3_leaf_unbalance()
2039 drop_leaf = drop_blk->bp->b_addr; in xfs_attr3_leaf_unbalance()
2040 save_leaf = save_blk->bp->b_addr; in xfs_attr3_leaf_unbalance()
2060 if (xfs_attr3_leaf_order(save_blk->bp, &savehdr, in xfs_attr3_leaf_unbalance()
2061 drop_blk->bp, &drophdr)) { in xfs_attr3_leaf_unbalance()
2098 if (xfs_attr3_leaf_order(save_blk->bp, &savehdr, in xfs_attr3_leaf_unbalance()
2099 drop_blk->bp, &drophdr)) { in xfs_attr3_leaf_unbalance()
2124 xfs_trans_log_buf(state->args->trans, save_blk->bp, 0, in xfs_attr3_leaf_unbalance()
2153 struct xfs_buf *bp, in xfs_attr3_leaf_lookup_int() argument
2168 leaf = bp->b_addr; in xfs_attr3_leaf_lookup_int()
2263 struct xfs_buf *bp, in xfs_attr3_leaf_getvalue() argument
2273 leaf = bp->b_addr; in xfs_attr3_leaf_getvalue()
2470 struct xfs_buf *bp, in xfs_attr_leaf_lasthash() argument
2475 struct xfs_mount *mp = bp->b_target->bt_mount; in xfs_attr_leaf_lasthash()
2477 xfs_attr3_leaf_hdr_from_disk(mp->m_attr_geo, &ichdr, bp->b_addr); in xfs_attr_leaf_lasthash()
2478 entries = xfs_attr3_leaf_entryp(bp->b_addr); in xfs_attr_leaf_lasthash()
2549 struct xfs_buf *bp; in xfs_attr3_leaf_clearflag() local
2562 error = xfs_attr3_leaf_read(args->trans, args->dp, args->blkno, -1, &bp); in xfs_attr3_leaf_clearflag()
2566 leaf = bp->b_addr; in xfs_attr3_leaf_clearflag()
2590 xfs_trans_log_buf(args->trans, bp, in xfs_attr3_leaf_clearflag()
2598 xfs_trans_log_buf(args->trans, bp, in xfs_attr3_leaf_clearflag()
2618 struct xfs_buf *bp; in xfs_attr3_leaf_setflag() local
2629 error = xfs_attr3_leaf_read(args->trans, args->dp, args->blkno, -1, &bp); in xfs_attr3_leaf_setflag()
2633 leaf = bp->b_addr; in xfs_attr3_leaf_setflag()
2643 xfs_trans_log_buf(args->trans, bp, in xfs_attr3_leaf_setflag()
2649 xfs_trans_log_buf(args->trans, bp, in xfs_attr3_leaf_setflag()