zdb: better handling for corrupt block pointers

When dumping indirect blocks, attempt to print corrupt block pointers
rather than abort the program.  When corruption is detected zdb will
exit with an error code of 3.

Sponsored by:	ConnectWise
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com>
Reviewed-by: Alek Pinchuk <alek.pinchuk@connectwise.com>
Signed-off-by:	Alan Somers <asomers@gmail.com>
Closes #17166
This commit is contained in:
Alan Somers
2025-08-12 15:16:37 -06:00
committed by GitHub
parent f8bc01c79f
commit d3c1d27afd
2 changed files with 62 additions and 13 deletions
+13 -1
View File
@@ -15,7 +15,7 @@
.\" Copyright (c) 2017 Lawrence Livermore National Security, LLC.
.\" Copyright (c) 2017 Intel Corporation.
.\"
.Dd October 27, 2024
.Dd April 23, 2025
.Dt ZDB 8
.Os
.
@@ -531,6 +531,18 @@ option, with more occurrences enabling more verbosity.
If no options are specified, all information about the named pool will be
displayed at default verbosity.
.
.Sh EXIT STATUS
The
.Nm
utility exits
.Sy 0
on success,
.Sy 1
if a fatal error occurs,
.Sy 2
if invalid command line options were specified, or
.Sy 3
if on-disk corruption was detected, but was not fatal.
.Sh EXAMPLES
.Ss Example 1 : No Display the configuration of imported pool Ar rpool
.Bd -literal