@@ -1092,7 +1092,7 @@ process_longform_attr(
}
/* FIX FOR bug 653709 -- EKN */
- if (!xfs_verify_fsbno(mp, bno)) {
+ if (!libxfs_verify_fsbno(mp, bno)) {
do_warn(
_("block in attribute fork of inode %" PRIu64 " is not valid\n"), ino);
return 1;
@@ -203,25 +203,6 @@ verify_aginum(xfs_mount_t *mp,
return verify_ag_bno(sbp, agno, agbno);
}
-/*
- * return 1 if block number is good, 0 if out of range
- */
-int
-verify_dfsbno(xfs_mount_t *mp,
- xfs_fsblock_t fsbno)
-{
- xfs_agnumber_t agno;
- xfs_agblock_t agbno;
- xfs_sb_t *sbp = &mp->m_sb;;
-
- /* range check ag #, ag block. range-checking offset is pointless */
-
- agno = XFS_FSB_TO_AGNO(mp, fsbno);
- agbno = XFS_FSB_TO_AGBNO(mp, fsbno);
-
- return verify_ag_bno(sbp, agno, agbno) == 0;
-}
-
#define XR_DFSBNORANGE_VALID 0
#define XR_DFSBNORANGE_BADSTART 1
#define XR_DFSBNORANGE_BADEND 2
@@ -835,7 +816,7 @@ _("bad numrecs 0 in inode %" PRIu64 " bmap btree root block\n"),
* btree, we'd do it right here. For now, if there's a
* problem, we'll bail out and presumably clear the inode.
*/
- if (!verify_dfsbno(mp, get_unaligned_be64(&pp[i]))) {
+ if (!libxfs_verify_fsbno(mp, get_unaligned_be64(&pp[i]))) {
do_warn(
_("bad bmap btree ptr 0x%" PRIx64 " in ino %" PRIu64 "\n"),
get_unaligned_be64(&pp[i]), lino);
@@ -9,10 +9,6 @@
struct blkmap;
struct prefetch_args;
-int
-verify_dfsbno(xfs_mount_t *mp,
- xfs_fsblock_t fsbno);
-
void
convert_extent(
xfs_bmbt_rec_t *rp,
@@ -188,8 +188,9 @@ pf_read_bmbt_reclist(
(irec.br_startoff >= fs_max_file_offset))
goto out_free;
- if (!verify_dfsbno(mp, irec.br_startblock) || !verify_dfsbno(mp,
- irec.br_startblock + irec.br_blockcount - 1))
+ if (!libxfs_verify_fsbno(mp, irec.br_startblock) ||
+ !libxfs_verify_fsbno(mp, irec.br_startblock +
+ irec.br_blockcount - 1))
goto out_free;
if (!args->dirs_only && ((irec.br_startoff +
@@ -337,7 +338,7 @@ pf_scanfunc_bmap(
for (i = 0; i < numrecs; i++) {
dbno = get_unaligned_be64(&pp[i]);
- if (!verify_dfsbno(mp, dbno))
+ if (!libxfs_verify_fsbno(mp, dbno))
return 0;
if (!pf_scan_lbtree(dbno, level, isadir, args, pf_scanfunc_bmap))
return 0;
@@ -379,7 +380,7 @@ pf_read_btinode(
for (i = 0; i < numrecs; i++) {
dbno = get_unaligned_be64(&pp[i]);
- if (!verify_dfsbno(mp, dbno))
+ if (!libxfs_verify_fsbno(mp, dbno))
break;
if (!pf_scan_lbtree(dbno, level, isadir, args, pf_scanfunc_bmap))
break;
@@ -491,7 +491,7 @@ _("inode %" PRIu64 " bad # of bmap records (%u, min - %u, max - %u)\n"),
* we'd do it right here. For now, if there's a problem,
* we'll bail out and presumably clear the inode.
*/
- if (!verify_dfsbno(mp, be64_to_cpu(pp[i]))) {
+ if (!libxfs_verify_fsbno(mp, be64_to_cpu(pp[i]))) {
do_warn(
_("bad bmap btree ptr 0x%llx in ino %" PRIu64 "\n"),
(unsigned long long) be64_to_cpu(pp[i]), ino);