if (scan_lbtree(get_unaligned_be64(&pp[i]), level, scan_bmapbt,
type, whichfork, lino, tot, nex, blkmapp,
- &cursor, 1, check_dups, magic,
+ &cursor, 0, 1, check_dups, magic,
(void *)zap_metadata, &xfs_bmbt_buf_ops))
return(1);
/*
xfs_extnum_t *nex,
blkmap_t **blkmapp,
bmap_cursor_t *bm_cursor,
+ int suspect,
int isroot,
int check_dups,
int *dirty,
xfs_extnum_t *nex,
blkmap_t **blkmapp,
bmap_cursor_t *bm_cursor,
+ int suspect,
int isroot,
int check_dups,
uint64_t magic,
XFS_FSB_TO_AGBNO(mp, root));
return(1);
}
+ if (bp->b_error == -EFSBADCRC || bp->b_error == -EFSCORRUPTED) {
+ do_warn(_("btree block %d/%d is suspect, error %d\n"),
+ XFS_FSB_TO_AGNO(mp, root),
+ XFS_FSB_TO_AGBNO(mp, root), bp->b_error);
+ suspect++;
+ }
/*
* only check for bad CRC here - caller will determine if there
err = (*func)(XFS_BUF_TO_BLOCK(bp), nlevels - 1,
type, whichfork, root, ino, tot, nex, blkmapp,
- bm_cursor, isroot, check_dups, &dirty,
+ bm_cursor, suspect, isroot, check_dups, &dirty,
magic, priv);
ASSERT(dirty == 0 || (dirty && !no_modify));
xfs_extnum_t *nex,
blkmap_t **blkmapp,
bmap_cursor_t *bm_cursor,
+ int suspect,
int isroot,
int check_dups,
int *dirty,
err = scan_lbtree(be64_to_cpu(pp[i]), level, scan_bmapbt,
type, whichfork, ino, tot, nex, blkmapp,
- bm_cursor, 0, check_dups, magic, priv,
+ bm_cursor, suspect, 0, check_dups, magic, priv,
&xfs_bmbt_buf_ops);
if (err)
return(1);
be64_to_cpu(pkey[numrecs - 1].br_startoff);
}
- return(0);
+ return suspect > 0 ? 1 : 0;
}
static void