{ TYP_BMAPBTD, "bmapbtd", handle_struct, bmapbtd_crc_hfld,
&xfs_bmbt_buf_ops, XFS_BTREE_LBLOCK_CRC_OFF },
{ TYP_BNOBT, "bnobt", handle_struct, bnobt_crc_hfld,
- &xfs_allocbt_buf_ops, XFS_BTREE_SBLOCK_CRC_OFF },
+ &xfs_bnobt_buf_ops, XFS_BTREE_SBLOCK_CRC_OFF },
{ TYP_CNTBT, "cntbt", handle_struct, cntbt_crc_hfld,
- &xfs_allocbt_buf_ops, XFS_BTREE_SBLOCK_CRC_OFF },
+ &xfs_cntbt_buf_ops, XFS_BTREE_SBLOCK_CRC_OFF },
{ TYP_RMAPBT, "rmapbt", handle_struct, rmapbt_crc_hfld,
&xfs_rmapbt_buf_ops, XFS_BTREE_SBLOCK_CRC_OFF },
{ TYP_REFCBT, "refcntbt", handle_struct, refcbt_crc_hfld,
{ TYP_BMAPBTD, "bmapbtd", handle_struct, bmapbtd_crc_hfld,
&xfs_bmbt_buf_ops, XFS_BTREE_LBLOCK_CRC_OFF },
{ TYP_BNOBT, "bnobt", handle_struct, bnobt_crc_hfld,
- &xfs_allocbt_buf_ops, XFS_BTREE_SBLOCK_CRC_OFF },
+ &xfs_bnobt_buf_ops, XFS_BTREE_SBLOCK_CRC_OFF },
{ TYP_CNTBT, "cntbt", handle_struct, cntbt_crc_hfld,
- &xfs_allocbt_buf_ops, XFS_BTREE_SBLOCK_CRC_OFF },
+ &xfs_cntbt_buf_ops, XFS_BTREE_SBLOCK_CRC_OFF },
{ TYP_RMAPBT, "rmapbt", handle_struct, rmapbt_crc_hfld,
&xfs_rmapbt_buf_ops, XFS_BTREE_SBLOCK_CRC_OFF },
{ TYP_REFCBT, "refcntbt", handle_struct, refcbt_crc_hfld,
{ /* BNO root block */
.daddr = XFS_AGB_TO_DADDR(mp, id->agno, XFS_BNO_BLOCK(mp)),
.numblks = BTOBB(mp->m_sb.sb_blocksize),
- .ops = &xfs_allocbt_buf_ops,
+ .ops = &xfs_bnobt_buf_ops,
.work = &xfs_bnoroot_init,
.need_init = true
},
{ /* CNT root block */
.daddr = XFS_AGB_TO_DADDR(mp, id->agno, XFS_CNT_BLOCK(mp)),
.numblks = BTOBB(mp->m_sb.sb_blocksize),
- .ops = &xfs_allocbt_buf_ops,
+ .ops = &xfs_cntbt_buf_ops,
.work = &xfs_cntroot_init,
.need_init = true
},
}
-const struct xfs_buf_ops xfs_allocbt_buf_ops = {
- .name = "xfs_allocbt",
+const struct xfs_buf_ops xfs_bnobt_buf_ops = {
+ .name = "xfs_bnobt",
.verify_read = xfs_allocbt_read_verify,
.verify_write = xfs_allocbt_write_verify,
.verify_struct = xfs_allocbt_verify,
};
+const struct xfs_buf_ops xfs_cntbt_buf_ops = {
+ .name = "xfs_cntbt",
+ .verify_read = xfs_allocbt_read_verify,
+ .verify_write = xfs_allocbt_write_verify,
+ .verify_struct = xfs_allocbt_verify,
+};
STATIC int
xfs_bnobt_keys_inorder(
.init_rec_from_cur = xfs_allocbt_init_rec_from_cur,
.init_ptr_from_cur = xfs_allocbt_init_ptr_from_cur,
.key_diff = xfs_bnobt_key_diff,
- .buf_ops = &xfs_allocbt_buf_ops,
+ .buf_ops = &xfs_bnobt_buf_ops,
.diff_two_keys = xfs_bnobt_diff_two_keys,
.keys_inorder = xfs_bnobt_keys_inorder,
.recs_inorder = xfs_bnobt_recs_inorder,
.init_rec_from_cur = xfs_allocbt_init_rec_from_cur,
.init_ptr_from_cur = xfs_allocbt_init_ptr_from_cur,
.key_diff = xfs_cntbt_key_diff,
- .buf_ops = &xfs_allocbt_buf_ops,
+ .buf_ops = &xfs_cntbt_buf_ops,
.diff_two_keys = xfs_cntbt_diff_two_keys,
.keys_inorder = xfs_cntbt_keys_inorder,
.recs_inorder = xfs_cntbt_recs_inorder,
extern const struct xfs_buf_ops xfs_agi_buf_ops;
extern const struct xfs_buf_ops xfs_agf_buf_ops;
extern const struct xfs_buf_ops xfs_agfl_buf_ops;
-extern const struct xfs_buf_ops xfs_allocbt_buf_ops;
+extern const struct xfs_buf_ops xfs_bnobt_buf_ops;
+extern const struct xfs_buf_ops xfs_cntbt_buf_ops;
extern const struct xfs_buf_ops xfs_rmapbt_buf_ops;
extern const struct xfs_buf_ops xfs_refcountbt_buf_ops;
extern const struct xfs_buf_ops xfs_attr3_leaf_buf_ops;
buf = libxfs_getbuf(mp->m_ddev_targp,
XFS_AGB_TO_DADDR(mp, agno, XFS_BNO_BLOCK(mp)),
BTOBB(cfg->blocksize));
- buf->b_ops = &xfs_allocbt_buf_ops;
+ buf->b_ops = &xfs_bnobt_buf_ops;
block = XFS_BUF_TO_BLOCK(buf);
memset(block, 0, cfg->blocksize);
libxfs_btree_init_block(mp, buf, XFS_BTNUM_BNO, 0, 1, agno, 0);
buf = libxfs_getbuf(mp->m_ddev_targp,
XFS_AGB_TO_DADDR(mp, agno, XFS_CNT_BLOCK(mp)),
BTOBB(cfg->blocksize));
- buf->b_ops = &xfs_allocbt_buf_ops;
+ buf->b_ops = &xfs_cntbt_buf_ops;
block = XFS_BUF_TO_BLOCK(buf);
memset(block, 0, cfg->blocksize);
libxfs_btree_init_block(mp, buf, XFS_BTNUM_CNT, 0, 1, agno, 0);
{
switch (btnum) {
case XFS_BTNUM_BNO:
+ return &xfs_bnobt_buf_ops;
case XFS_BTNUM_CNT:
- return &xfs_allocbt_buf_ops;
+ return &xfs_cntbt_buf_ops;
case XFS_BTNUM_INO:
return &xfs_inobt_buf_ops;
case XFS_BTNUM_FINO:
: XFS_ABTB_MAGIC;
scan_sbtree(bno, be32_to_cpu(agf->agf_levels[XFS_BTNUM_BNO]),
agno, 0, scan_allocbt, 1, magic, agcnts,
- &xfs_allocbt_buf_ops);
+ &xfs_bnobt_buf_ops);
} else {
do_warn(_("bad agbno %u for btbno root, agno %d\n"),
bno, agno);
: XFS_ABTC_MAGIC;
scan_sbtree(bno, be32_to_cpu(agf->agf_levels[XFS_BTNUM_CNT]),
agno, 0, scan_allocbt, 1, magic, agcnts,
- &xfs_allocbt_buf_ops);
+ &xfs_cntbt_buf_ops);
} else {
do_warn(_("bad agbno %u for btbcnt root, agno %d\n"),
bno, agno);