Commit cec57256 authored by Darrick J. Wong's avatar Darrick J. Wong

xfs: bmap debugging should never panic the system

Don't panic() the system if the bmap records are garbage, just call
ASSERT which gives us the same backtrace but enables developers to
control if the system goes down or not.  This makes debugging with
generic/388 much easier because it won't reboot the machine midway
through a run just because btree_read_bufl returns EIO when the fs has
already shut down.
Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarBrian Foster <bfoster@redhat.com>
parent 8804630e
...@@ -312,8 +312,9 @@ xfs_check_block( ...@@ -312,8 +312,9 @@ xfs_check_block(
xfs_warn(mp, "%s: thispa(%d) == pp(%d) %Ld", xfs_warn(mp, "%s: thispa(%d) == pp(%d) %Ld",
__func__, j, i, __func__, j, i,
(unsigned long long)be64_to_cpu(*thispa)); (unsigned long long)be64_to_cpu(*thispa));
panic("%s: ptrs are equal in node\n", xfs_err(mp, "%s: ptrs are equal in node\n",
__func__); __func__);
xfs_force_shutdown(mp, SHUTDOWN_CORRUPT_INCORE);
} }
} }
} }
...@@ -483,7 +484,8 @@ xfs_bmap_check_leaf_extents( ...@@ -483,7 +484,8 @@ xfs_bmap_check_leaf_extents(
error_norelse: error_norelse:
xfs_warn(mp, "%s: BAD after btree leaves for %d extents", xfs_warn(mp, "%s: BAD after btree leaves for %d extents",
__func__, i); __func__, i);
panic("%s: CORRUPTED BTREE OR SOMETHING", __func__); xfs_err(mp, "%s: CORRUPTED BTREE OR SOMETHING", __func__);
xfs_force_shutdown(mp, SHUTDOWN_CORRUPT_INCORE);
return; return;
} }
......
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