Commit 5ef819c3 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Darrick J. Wong

xfs: rename btree helpers that depends on the block number representation

All these helpers hardcode fsblocks or agblocks and not just the pointer
size.  Rename them so that the names are still fitting when we add the
long format in-memory blocks and adjust the checks when calling them to
check the btree types and not just pointer length.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarDarrick J. Wong <djwong@kernel.org>
Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
parent 4ce0c711
...@@ -322,7 +322,7 @@ xfs_allocbt_verify( ...@@ -322,7 +322,7 @@ xfs_allocbt_verify(
return __this_address; return __this_address;
if (xfs_has_crc(mp)) { if (xfs_has_crc(mp)) {
fa = xfs_btree_sblock_v5hdr_verify(bp); fa = xfs_btree_agblock_v5hdr_verify(bp);
if (fa) if (fa)
return fa; return fa;
} }
...@@ -362,7 +362,7 @@ xfs_allocbt_verify( ...@@ -362,7 +362,7 @@ xfs_allocbt_verify(
} else if (level >= mp->m_alloc_maxlevels) } else if (level >= mp->m_alloc_maxlevels)
return __this_address; return __this_address;
return xfs_btree_sblock_verify(bp, mp->m_alloc_mxr[level != 0]); return xfs_btree_agblock_verify(bp, mp->m_alloc_mxr[level != 0]);
} }
static void static void
...@@ -371,7 +371,7 @@ xfs_allocbt_read_verify( ...@@ -371,7 +371,7 @@ xfs_allocbt_read_verify(
{ {
xfs_failaddr_t fa; xfs_failaddr_t fa;
if (!xfs_btree_sblock_verify_crc(bp)) if (!xfs_btree_agblock_verify_crc(bp))
xfs_verifier_error(bp, -EFSBADCRC, __this_address); xfs_verifier_error(bp, -EFSBADCRC, __this_address);
else { else {
fa = xfs_allocbt_verify(bp); fa = xfs_allocbt_verify(bp);
...@@ -395,7 +395,7 @@ xfs_allocbt_write_verify( ...@@ -395,7 +395,7 @@ xfs_allocbt_write_verify(
xfs_verifier_error(bp, -EFSCORRUPTED, fa); xfs_verifier_error(bp, -EFSCORRUPTED, fa);
return; return;
} }
xfs_btree_sblock_calc_crc(bp); xfs_btree_agblock_calc_crc(bp);
} }
......
...@@ -420,7 +420,7 @@ xfs_bmbt_verify( ...@@ -420,7 +420,7 @@ xfs_bmbt_verify(
* XXX: need a better way of verifying the owner here. Right now * XXX: need a better way of verifying the owner here. Right now
* just make sure there has been one set. * just make sure there has been one set.
*/ */
fa = xfs_btree_lblock_v5hdr_verify(bp, XFS_RMAP_OWN_UNKNOWN); fa = xfs_btree_fsblock_v5hdr_verify(bp, XFS_RMAP_OWN_UNKNOWN);
if (fa) if (fa)
return fa; return fa;
} }
...@@ -436,7 +436,7 @@ xfs_bmbt_verify( ...@@ -436,7 +436,7 @@ xfs_bmbt_verify(
if (level > max(mp->m_bm_maxlevels[0], mp->m_bm_maxlevels[1])) if (level > max(mp->m_bm_maxlevels[0], mp->m_bm_maxlevels[1]))
return __this_address; return __this_address;
return xfs_btree_lblock_verify(bp, mp->m_bmap_dmxr[level != 0]); return xfs_btree_fsblock_verify(bp, mp->m_bmap_dmxr[level != 0]);
} }
static void static void
...@@ -445,7 +445,7 @@ xfs_bmbt_read_verify( ...@@ -445,7 +445,7 @@ xfs_bmbt_read_verify(
{ {
xfs_failaddr_t fa; xfs_failaddr_t fa;
if (!xfs_btree_lblock_verify_crc(bp)) if (!xfs_btree_fsblock_verify_crc(bp))
xfs_verifier_error(bp, -EFSBADCRC, __this_address); xfs_verifier_error(bp, -EFSBADCRC, __this_address);
else { else {
fa = xfs_bmbt_verify(bp); fa = xfs_bmbt_verify(bp);
...@@ -469,7 +469,7 @@ xfs_bmbt_write_verify( ...@@ -469,7 +469,7 @@ xfs_bmbt_write_verify(
xfs_verifier_error(bp, -EFSCORRUPTED, fa); xfs_verifier_error(bp, -EFSCORRUPTED, fa);
return; return;
} }
xfs_btree_lblock_calc_crc(bp); xfs_btree_fsblock_calc_crc(bp);
} }
const struct xfs_buf_ops xfs_bmbt_buf_ops = { const struct xfs_buf_ops xfs_bmbt_buf_ops = {
......
...@@ -57,7 +57,7 @@ xfs_btree_magic( ...@@ -57,7 +57,7 @@ xfs_btree_magic(
* bytes. * bytes.
*/ */
static inline xfs_failaddr_t static inline xfs_failaddr_t
xfs_btree_check_lblock_siblings( xfs_btree_check_fsblock_siblings(
struct xfs_mount *mp, struct xfs_mount *mp,
xfs_fsblock_t fsb, xfs_fsblock_t fsb,
__be64 dsibling) __be64 dsibling)
...@@ -76,7 +76,7 @@ xfs_btree_check_lblock_siblings( ...@@ -76,7 +76,7 @@ xfs_btree_check_lblock_siblings(
} }
static inline xfs_failaddr_t static inline xfs_failaddr_t
xfs_btree_check_sblock_siblings( xfs_btree_check_agblock_siblings(
struct xfs_perag *pag, struct xfs_perag *pag,
xfs_agblock_t agbno, xfs_agblock_t agbno,
__be32 dsibling) __be32 dsibling)
...@@ -99,7 +99,7 @@ xfs_btree_check_sblock_siblings( ...@@ -99,7 +99,7 @@ xfs_btree_check_sblock_siblings(
* or NULL if everything is ok. * or NULL if everything is ok.
*/ */
static xfs_failaddr_t static xfs_failaddr_t
__xfs_btree_check_lblock( __xfs_btree_check_fsblock(
struct xfs_btree_cur *cur, struct xfs_btree_cur *cur,
struct xfs_btree_block *block, struct xfs_btree_block *block,
int level, int level,
...@@ -140,9 +140,10 @@ __xfs_btree_check_lblock( ...@@ -140,9 +140,10 @@ __xfs_btree_check_lblock(
} }
fsb = XFS_DADDR_TO_FSB(mp, xfs_buf_daddr(bp)); fsb = XFS_DADDR_TO_FSB(mp, xfs_buf_daddr(bp));
fa = xfs_btree_check_lblock_siblings(mp, fsb, block->bb_u.l.bb_leftsib); fa = xfs_btree_check_fsblock_siblings(mp, fsb,
block->bb_u.l.bb_leftsib);
if (!fa) if (!fa)
fa = xfs_btree_check_lblock_siblings(mp, fsb, fa = xfs_btree_check_fsblock_siblings(mp, fsb,
block->bb_u.l.bb_rightsib); block->bb_u.l.bb_rightsib);
return fa; return fa;
} }
...@@ -152,7 +153,7 @@ __xfs_btree_check_lblock( ...@@ -152,7 +153,7 @@ __xfs_btree_check_lblock(
* or NULL if everything is ok. * or NULL if everything is ok.
*/ */
static xfs_failaddr_t static xfs_failaddr_t
__xfs_btree_check_sblock( __xfs_btree_check_agblock(
struct xfs_btree_cur *cur, struct xfs_btree_cur *cur,
struct xfs_btree_block *block, struct xfs_btree_block *block,
int level, int level,
...@@ -179,10 +180,10 @@ __xfs_btree_check_sblock( ...@@ -179,10 +180,10 @@ __xfs_btree_check_sblock(
return __this_address; return __this_address;
agbno = xfs_daddr_to_agbno(mp, xfs_buf_daddr(bp)); agbno = xfs_daddr_to_agbno(mp, xfs_buf_daddr(bp));
fa = xfs_btree_check_sblock_siblings(pag, agbno, fa = xfs_btree_check_agblock_siblings(pag, agbno,
block->bb_u.s.bb_leftsib); block->bb_u.s.bb_leftsib);
if (!fa) if (!fa)
fa = xfs_btree_check_sblock_siblings(pag, agbno, fa = xfs_btree_check_agblock_siblings(pag, agbno,
block->bb_u.s.bb_rightsib); block->bb_u.s.bb_rightsib);
return fa; return fa;
} }
...@@ -199,9 +200,9 @@ __xfs_btree_check_block( ...@@ -199,9 +200,9 @@ __xfs_btree_check_block(
int level, int level,
struct xfs_buf *bp) struct xfs_buf *bp)
{ {
if (cur->bc_ops->ptr_len == XFS_BTREE_SHORT_PTR_LEN) if (cur->bc_ops->type == XFS_BTREE_TYPE_AG)
return __xfs_btree_check_sblock(cur, block, level, bp); return __xfs_btree_check_agblock(cur, block, level, bp);
return __xfs_btree_check_lblock(cur, block, level, bp); return __xfs_btree_check_fsblock(cur, block, level, bp);
} }
static inline unsigned int xfs_btree_block_errtag(struct xfs_btree_cur *cur) static inline unsigned int xfs_btree_block_errtag(struct xfs_btree_cur *cur)
...@@ -245,7 +246,7 @@ __xfs_btree_check_ptr( ...@@ -245,7 +246,7 @@ __xfs_btree_check_ptr(
if (level <= 0) if (level <= 0)
return -EFSCORRUPTED; return -EFSCORRUPTED;
if (cur->bc_ops->ptr_len == XFS_BTREE_LONG_PTR_LEN) { if (cur->bc_ops->type == XFS_BTREE_TYPE_INODE) {
if (!xfs_verify_fsbno(cur->bc_mp, if (!xfs_verify_fsbno(cur->bc_mp,
be64_to_cpu((&ptr->l)[index]))) be64_to_cpu((&ptr->l)[index])))
return -EFSCORRUPTED; return -EFSCORRUPTED;
...@@ -273,7 +274,7 @@ xfs_btree_check_ptr( ...@@ -273,7 +274,7 @@ xfs_btree_check_ptr(
error = __xfs_btree_check_ptr(cur, ptr, index, level); error = __xfs_btree_check_ptr(cur, ptr, index, level);
if (error) { if (error) {
if (cur->bc_ops->ptr_len == XFS_BTREE_LONG_PTR_LEN) { if (cur->bc_ops->type == XFS_BTREE_TYPE_INODE) {
xfs_err(cur->bc_mp, xfs_err(cur->bc_mp,
"Inode %llu fork %d: Corrupt %sbt pointer at level %d index %d.", "Inode %llu fork %d: Corrupt %sbt pointer at level %d index %d.",
cur->bc_ino.ip->i_ino, cur->bc_ino.ip->i_ino,
...@@ -306,7 +307,7 @@ xfs_btree_check_ptr( ...@@ -306,7 +307,7 @@ xfs_btree_check_ptr(
* it to disk. * it to disk.
*/ */
void void
xfs_btree_lblock_calc_crc( xfs_btree_fsblock_calc_crc(
struct xfs_buf *bp) struct xfs_buf *bp)
{ {
struct xfs_btree_block *block = XFS_BUF_TO_BLOCK(bp); struct xfs_btree_block *block = XFS_BUF_TO_BLOCK(bp);
...@@ -320,7 +321,7 @@ xfs_btree_lblock_calc_crc( ...@@ -320,7 +321,7 @@ xfs_btree_lblock_calc_crc(
} }
bool bool
xfs_btree_lblock_verify_crc( xfs_btree_fsblock_verify_crc(
struct xfs_buf *bp) struct xfs_buf *bp)
{ {
struct xfs_btree_block *block = XFS_BUF_TO_BLOCK(bp); struct xfs_btree_block *block = XFS_BUF_TO_BLOCK(bp);
...@@ -344,7 +345,7 @@ xfs_btree_lblock_verify_crc( ...@@ -344,7 +345,7 @@ xfs_btree_lblock_verify_crc(
* it to disk. * it to disk.
*/ */
void void
xfs_btree_sblock_calc_crc( xfs_btree_agblock_calc_crc(
struct xfs_buf *bp) struct xfs_buf *bp)
{ {
struct xfs_btree_block *block = XFS_BUF_TO_BLOCK(bp); struct xfs_btree_block *block = XFS_BUF_TO_BLOCK(bp);
...@@ -358,7 +359,7 @@ xfs_btree_sblock_calc_crc( ...@@ -358,7 +359,7 @@ xfs_btree_sblock_calc_crc(
} }
bool bool
xfs_btree_sblock_verify_crc( xfs_btree_agblock_verify_crc(
struct xfs_buf *bp) struct xfs_buf *bp)
{ {
struct xfs_btree_block *block = XFS_BUF_TO_BLOCK(bp); struct xfs_btree_block *block = XFS_BUF_TO_BLOCK(bp);
...@@ -913,7 +914,7 @@ xfs_btree_reada_bufs( ...@@ -913,7 +914,7 @@ xfs_btree_reada_bufs(
} }
STATIC int STATIC int
xfs_btree_readahead_lblock( xfs_btree_readahead_fsblock(
struct xfs_btree_cur *cur, struct xfs_btree_cur *cur,
int lr, int lr,
struct xfs_btree_block *block) struct xfs_btree_block *block)
...@@ -938,7 +939,7 @@ xfs_btree_readahead_lblock( ...@@ -938,7 +939,7 @@ xfs_btree_readahead_lblock(
} }
STATIC int STATIC int
xfs_btree_readahead_sblock( xfs_btree_readahead_agblock(
struct xfs_btree_cur *cur, struct xfs_btree_cur *cur,
int lr, int lr,
struct xfs_btree_block *block) struct xfs_btree_block *block)
...@@ -989,8 +990,8 @@ xfs_btree_readahead( ...@@ -989,8 +990,8 @@ xfs_btree_readahead(
block = XFS_BUF_TO_BLOCK(cur->bc_levels[lev].bp); block = XFS_BUF_TO_BLOCK(cur->bc_levels[lev].bp);
if (cur->bc_ops->ptr_len == XFS_BTREE_LONG_PTR_LEN) if (cur->bc_ops->ptr_len == XFS_BTREE_LONG_PTR_LEN)
return xfs_btree_readahead_lblock(cur, lr, block); return xfs_btree_readahead_fsblock(cur, lr, block);
return xfs_btree_readahead_sblock(cur, lr, block); return xfs_btree_readahead_agblock(cur, lr, block);
} }
STATIC int STATIC int
...@@ -4597,7 +4598,7 @@ xfs_btree_change_owner( ...@@ -4597,7 +4598,7 @@ xfs_btree_change_owner(
/* Verify the v5 fields of a long-format btree block. */ /* Verify the v5 fields of a long-format btree block. */
xfs_failaddr_t xfs_failaddr_t
xfs_btree_lblock_v5hdr_verify( xfs_btree_fsblock_v5hdr_verify(
struct xfs_buf *bp, struct xfs_buf *bp,
uint64_t owner) uint64_t owner)
{ {
...@@ -4618,7 +4619,7 @@ xfs_btree_lblock_v5hdr_verify( ...@@ -4618,7 +4619,7 @@ xfs_btree_lblock_v5hdr_verify(
/* Verify a long-format btree block. */ /* Verify a long-format btree block. */
xfs_failaddr_t xfs_failaddr_t
xfs_btree_lblock_verify( xfs_btree_fsblock_verify(
struct xfs_buf *bp, struct xfs_buf *bp,
unsigned int max_recs) unsigned int max_recs)
{ {
...@@ -4633,21 +4634,22 @@ xfs_btree_lblock_verify( ...@@ -4633,21 +4634,22 @@ xfs_btree_lblock_verify(
/* sibling pointer verification */ /* sibling pointer verification */
fsb = XFS_DADDR_TO_FSB(mp, xfs_buf_daddr(bp)); fsb = XFS_DADDR_TO_FSB(mp, xfs_buf_daddr(bp));
fa = xfs_btree_check_lblock_siblings(mp, fsb, block->bb_u.l.bb_leftsib); fa = xfs_btree_check_fsblock_siblings(mp, fsb,
block->bb_u.l.bb_leftsib);
if (!fa) if (!fa)
fa = xfs_btree_check_lblock_siblings(mp, fsb, fa = xfs_btree_check_fsblock_siblings(mp, fsb,
block->bb_u.l.bb_rightsib); block->bb_u.l.bb_rightsib);
return fa; return fa;
} }
/** /**
* xfs_btree_sblock_v5hdr_verify() -- verify the v5 fields of a short-format * xfs_btree_agblock_v5hdr_verify() -- verify the v5 fields of a short-format
* btree block * btree block
* *
* @bp: buffer containing the btree block * @bp: buffer containing the btree block
*/ */
xfs_failaddr_t xfs_failaddr_t
xfs_btree_sblock_v5hdr_verify( xfs_btree_agblock_v5hdr_verify(
struct xfs_buf *bp) struct xfs_buf *bp)
{ {
struct xfs_mount *mp = bp->b_mount; struct xfs_mount *mp = bp->b_mount;
...@@ -4666,13 +4668,13 @@ xfs_btree_sblock_v5hdr_verify( ...@@ -4666,13 +4668,13 @@ xfs_btree_sblock_v5hdr_verify(
} }
/** /**
* xfs_btree_sblock_verify() -- verify a short-format btree block * xfs_btree_agblock_verify() -- verify a short-format btree block
* *
* @bp: buffer containing the btree block * @bp: buffer containing the btree block
* @max_recs: maximum records allowed in this btree node * @max_recs: maximum records allowed in this btree node
*/ */
xfs_failaddr_t xfs_failaddr_t
xfs_btree_sblock_verify( xfs_btree_agblock_verify(
struct xfs_buf *bp, struct xfs_buf *bp,
unsigned int max_recs) unsigned int max_recs)
{ {
...@@ -4687,10 +4689,10 @@ xfs_btree_sblock_verify( ...@@ -4687,10 +4689,10 @@ xfs_btree_sblock_verify(
/* sibling pointer verification */ /* sibling pointer verification */
agbno = xfs_daddr_to_agbno(mp, xfs_buf_daddr(bp)); agbno = xfs_daddr_to_agbno(mp, xfs_buf_daddr(bp));
fa = xfs_btree_check_sblock_siblings(bp->b_pag, agbno, fa = xfs_btree_check_agblock_siblings(bp->b_pag, agbno,
block->bb_u.s.bb_leftsib); block->bb_u.s.bb_leftsib);
if (!fa) if (!fa)
fa = xfs_btree_check_sblock_siblings(bp->b_pag, agbno, fa = xfs_btree_check_agblock_siblings(bp->b_pag, agbno,
block->bb_u.s.bb_rightsib); block->bb_u.s.bb_rightsib);
return fa; return fa;
} }
......
...@@ -441,10 +441,10 @@ int xfs_btree_change_owner(struct xfs_btree_cur *cur, uint64_t new_owner, ...@@ -441,10 +441,10 @@ int xfs_btree_change_owner(struct xfs_btree_cur *cur, uint64_t new_owner,
/* /*
* btree block CRC helpers * btree block CRC helpers
*/ */
void xfs_btree_lblock_calc_crc(struct xfs_buf *); void xfs_btree_fsblock_calc_crc(struct xfs_buf *);
bool xfs_btree_lblock_verify_crc(struct xfs_buf *); bool xfs_btree_fsblock_verify_crc(struct xfs_buf *);
void xfs_btree_sblock_calc_crc(struct xfs_buf *); void xfs_btree_agblock_calc_crc(struct xfs_buf *);
bool xfs_btree_sblock_verify_crc(struct xfs_buf *); bool xfs_btree_agblock_verify_crc(struct xfs_buf *);
/* /*
* Internal btree helpers also used by xfs_bmap.c. * Internal btree helpers also used by xfs_bmap.c.
...@@ -484,12 +484,12 @@ static inline int xfs_btree_get_level(const struct xfs_btree_block *block) ...@@ -484,12 +484,12 @@ static inline int xfs_btree_get_level(const struct xfs_btree_block *block)
#define XFS_FILBLKS_MIN(a,b) min_t(xfs_filblks_t, (a), (b)) #define XFS_FILBLKS_MIN(a,b) min_t(xfs_filblks_t, (a), (b))
#define XFS_FILBLKS_MAX(a,b) max_t(xfs_filblks_t, (a), (b)) #define XFS_FILBLKS_MAX(a,b) max_t(xfs_filblks_t, (a), (b))
xfs_failaddr_t xfs_btree_sblock_v5hdr_verify(struct xfs_buf *bp); xfs_failaddr_t xfs_btree_agblock_v5hdr_verify(struct xfs_buf *bp);
xfs_failaddr_t xfs_btree_sblock_verify(struct xfs_buf *bp, xfs_failaddr_t xfs_btree_agblock_verify(struct xfs_buf *bp,
unsigned int max_recs); unsigned int max_recs);
xfs_failaddr_t xfs_btree_lblock_v5hdr_verify(struct xfs_buf *bp, xfs_failaddr_t xfs_btree_fsblock_v5hdr_verify(struct xfs_buf *bp,
uint64_t owner); uint64_t owner);
xfs_failaddr_t xfs_btree_lblock_verify(struct xfs_buf *bp, xfs_failaddr_t xfs_btree_fsblock_verify(struct xfs_buf *bp,
unsigned int max_recs); unsigned int max_recs);
unsigned int xfs_btree_compute_maxlevels(const unsigned int *limits, unsigned int xfs_btree_compute_maxlevels(const unsigned int *limits,
......
...@@ -309,7 +309,7 @@ xfs_inobt_verify( ...@@ -309,7 +309,7 @@ xfs_inobt_verify(
* xfs_perag_initialised_agi(pag)) if we ever do. * xfs_perag_initialised_agi(pag)) if we ever do.
*/ */
if (xfs_has_crc(mp)) { if (xfs_has_crc(mp)) {
fa = xfs_btree_sblock_v5hdr_verify(bp); fa = xfs_btree_agblock_v5hdr_verify(bp);
if (fa) if (fa)
return fa; return fa;
} }
...@@ -319,7 +319,7 @@ xfs_inobt_verify( ...@@ -319,7 +319,7 @@ xfs_inobt_verify(
if (level >= M_IGEO(mp)->inobt_maxlevels) if (level >= M_IGEO(mp)->inobt_maxlevels)
return __this_address; return __this_address;
return xfs_btree_sblock_verify(bp, return xfs_btree_agblock_verify(bp,
M_IGEO(mp)->inobt_mxr[level != 0]); M_IGEO(mp)->inobt_mxr[level != 0]);
} }
...@@ -329,7 +329,7 @@ xfs_inobt_read_verify( ...@@ -329,7 +329,7 @@ xfs_inobt_read_verify(
{ {
xfs_failaddr_t fa; xfs_failaddr_t fa;
if (!xfs_btree_sblock_verify_crc(bp)) if (!xfs_btree_agblock_verify_crc(bp))
xfs_verifier_error(bp, -EFSBADCRC, __this_address); xfs_verifier_error(bp, -EFSBADCRC, __this_address);
else { else {
fa = xfs_inobt_verify(bp); fa = xfs_inobt_verify(bp);
...@@ -353,7 +353,7 @@ xfs_inobt_write_verify( ...@@ -353,7 +353,7 @@ xfs_inobt_write_verify(
xfs_verifier_error(bp, -EFSCORRUPTED, fa); xfs_verifier_error(bp, -EFSCORRUPTED, fa);
return; return;
} }
xfs_btree_sblock_calc_crc(bp); xfs_btree_agblock_calc_crc(bp);
} }
......
...@@ -217,7 +217,7 @@ xfs_refcountbt_verify( ...@@ -217,7 +217,7 @@ xfs_refcountbt_verify(
if (!xfs_has_reflink(mp)) if (!xfs_has_reflink(mp))
return __this_address; return __this_address;
fa = xfs_btree_sblock_v5hdr_verify(bp); fa = xfs_btree_agblock_v5hdr_verify(bp);
if (fa) if (fa)
return fa; return fa;
...@@ -239,7 +239,7 @@ xfs_refcountbt_verify( ...@@ -239,7 +239,7 @@ xfs_refcountbt_verify(
} else if (level >= mp->m_refc_maxlevels) } else if (level >= mp->m_refc_maxlevels)
return __this_address; return __this_address;
return xfs_btree_sblock_verify(bp, mp->m_refc_mxr[level != 0]); return xfs_btree_agblock_verify(bp, mp->m_refc_mxr[level != 0]);
} }
STATIC void STATIC void
...@@ -248,7 +248,7 @@ xfs_refcountbt_read_verify( ...@@ -248,7 +248,7 @@ xfs_refcountbt_read_verify(
{ {
xfs_failaddr_t fa; xfs_failaddr_t fa;
if (!xfs_btree_sblock_verify_crc(bp)) if (!xfs_btree_agblock_verify_crc(bp))
xfs_verifier_error(bp, -EFSBADCRC, __this_address); xfs_verifier_error(bp, -EFSBADCRC, __this_address);
else { else {
fa = xfs_refcountbt_verify(bp); fa = xfs_refcountbt_verify(bp);
...@@ -272,7 +272,7 @@ xfs_refcountbt_write_verify( ...@@ -272,7 +272,7 @@ xfs_refcountbt_write_verify(
xfs_verifier_error(bp, -EFSCORRUPTED, fa); xfs_verifier_error(bp, -EFSCORRUPTED, fa);
return; return;
} }
xfs_btree_sblock_calc_crc(bp); xfs_btree_agblock_calc_crc(bp);
} }
......
...@@ -336,7 +336,7 @@ xfs_rmapbt_verify( ...@@ -336,7 +336,7 @@ xfs_rmapbt_verify(
if (!xfs_has_rmapbt(mp)) if (!xfs_has_rmapbt(mp))
return __this_address; return __this_address;
fa = xfs_btree_sblock_v5hdr_verify(bp); fa = xfs_btree_agblock_v5hdr_verify(bp);
if (fa) if (fa)
return fa; return fa;
...@@ -347,7 +347,7 @@ xfs_rmapbt_verify( ...@@ -347,7 +347,7 @@ xfs_rmapbt_verify(
} else if (level >= mp->m_rmap_maxlevels) } else if (level >= mp->m_rmap_maxlevels)
return __this_address; return __this_address;
return xfs_btree_sblock_verify(bp, mp->m_rmap_mxr[level != 0]); return xfs_btree_agblock_verify(bp, mp->m_rmap_mxr[level != 0]);
} }
static void static void
...@@ -356,7 +356,7 @@ xfs_rmapbt_read_verify( ...@@ -356,7 +356,7 @@ xfs_rmapbt_read_verify(
{ {
xfs_failaddr_t fa; xfs_failaddr_t fa;
if (!xfs_btree_sblock_verify_crc(bp)) if (!xfs_btree_agblock_verify_crc(bp))
xfs_verifier_error(bp, -EFSBADCRC, __this_address); xfs_verifier_error(bp, -EFSBADCRC, __this_address);
else { else {
fa = xfs_rmapbt_verify(bp); fa = xfs_rmapbt_verify(bp);
...@@ -380,7 +380,7 @@ xfs_rmapbt_write_verify( ...@@ -380,7 +380,7 @@ xfs_rmapbt_write_verify(
xfs_verifier_error(bp, -EFSCORRUPTED, fa); xfs_verifier_error(bp, -EFSCORRUPTED, fa);
return; return;
} }
xfs_btree_sblock_calc_crc(bp); xfs_btree_agblock_calc_crc(bp);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment