break;
default:
dbprintf(_("Unknown attribute buffer type!\n"));
- xfs_buf_ioerror(bp, EFSCORRUPTED);
+ xfs_buf_ioerror(bp, -EFSCORRUPTED);
return;
}
verify:
struct xfs_buf *bp)
{
dbprintf(_("Writing unknown attribute buffer type!\n"));
- xfs_buf_ioerror(bp, EFSCORRUPTED);
+ xfs_buf_ioerror(bp, -EFSCORRUPTED);
}
const struct xfs_buf_ops xfs_attr3_db_buf_ops = {
break;
default:
dbprintf(_("Unknown directory buffer type!\n"));
- xfs_buf_ioerror(bp, EFSCORRUPTED);
+ xfs_buf_ioerror(bp, -EFSCORRUPTED);
return;
}
verify:
struct xfs_buf *bp)
{
dbprintf(_("Writing unknown directory buffer type!\n"));
- xfs_buf_ioerror(bp, EFSCORRUPTED);
+ xfs_buf_ioerror(bp, -EFSCORRUPTED);
}
const struct xfs_buf_ops xfs_dir3_db_buf_ops = {
* Keep the buffer even if the verifier says it is corrupted.
* We're a diagnostic tool, after all.
*/
- if (!bp || (bp->b_error && bp->b_error != EFSCORRUPTED &&
- bp->b_error != EFSBADCRC))
+ if (!bp || (bp->b_error && bp->b_error != -EFSCORRUPTED &&
+ bp->b_error != -EFSBADCRC))
return;
iocur_top->buf = bp->b_addr;
iocur_top->bp = bp;
return -1;
if (iocur_top->bp->b_flags & LIBXFS_B_UNCHECKED)
return -1;
- return (iocur_top->bp->b_error != EFSBADCRC &&
+ return (iocur_top->bp->b_error != -EFSBADCRC &&
(!iocur_top->ino_buf || iocur_top->ino_crc_ok));
}
goto error_out;
}
/* corrupt node; rebuild the dir. */
- if (bp->b_error == EFSBADCRC || bp->b_error == EFSCORRUPTED) {
+ if (bp->b_error == -EFSBADCRC || bp->b_error == -EFSCORRUPTED) {
do_warn(
_("corrupt tree block %u for directory inode %" PRIu64 "\n"),
bno, da_cursor->ino);
do_error(_("can't read btree block %d/%d\n"), agno, root);
return;
}
- if (bp->b_error == EFSBADCRC || bp->b_error == EFSCORRUPTED) {
+ if (bp->b_error == -EFSBADCRC || bp->b_error == -EFSCORRUPTED) {
do_warn(_("btree block %d/%d is suspect, error %d\n"),
agno, root, bp->b_error);
suspect = 1;
* is a corruption or not and whether it got corrected and so needs
* writing back. CRC errors always imply we need to write the block.
*/
- if (bp->b_error == EFSBADCRC) {
+ if (bp->b_error == -EFSBADCRC) {
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);
do_abort(_("can't read agfl block for ag %d\n"), agno);
return;
}
- if (agflbuf->b_error == EFSBADCRC)
+ if (agflbuf->b_error == -EFSBADCRC)
do_warn(_("agfl has bad CRC for ag %d\n"), agno);
freelist = XFS_BUF_TO_AGFL_BNO(mp, agflbuf);
* immediately, though.
*/
if (!no_modify) {
- agi_dirty += (agibuf->b_error == EFSBADCRC);
- agf_dirty += (agfbuf->b_error == EFSBADCRC);
- sb_dirty += (sbbuf->b_error == EFSBADCRC);
+ agi_dirty += (agibuf->b_error == -EFSBADCRC);
+ agf_dirty += (agfbuf->b_error == -EFSBADCRC);
+ sb_dirty += (sbbuf->b_error == -EFSBADCRC);
}
if (agi_dirty && !no_modify)