Chunwei Chen d3190c5f29 Fix zdb -c traverse stop on damaged objset root
If a corruption happens to be on a root block of an objset, zdb -c will
not correctly report the error, and it will not traverse the datasets
that come after. This is because traverse_visitbp, which does the
callback and reset error for TRAVERSE_HARD, is skipped when traversing
zil is failed in traverse_impl.

Here's example of what 'zdb -eLcc' command looks like on a pool with
damaged objset root:

== before patch:

Traversing all blocks to verify checksums ...

Error counts:

	errno  count
block traversal size 379392 != alloc 33987072 (unreachable 33607680)

	bp count:             172
	ganged count:           0
	bp logical:       1678336      avg:   9757
	bp physical:       130560      avg:    759     compression:  12.85
	bp allocated:      379392      avg:   2205     compression:   4.42
	bp deduped:             0    ref>1:      0   deduplication:   1.00
	SPA allocated:   33987072     used:  0.80%

	additional, non-pointer bps of type 0:         71
	Dittoed blocks on same vdev: 101

== after patch:

Traversing all blocks to verify checksums ...

zdb_blkptr_cb: Got error 52 reading <54, 0, -1, 0>  -- skipping

Error counts:

	errno  count
	   52  1
block traversal size 33963520 != alloc 33987072 (unreachable 23552)

	bp count:             447
	ganged count:           0
	bp logical:      36093440      avg:  80745
	bp physical:     33699840      avg:  75391     compression:   1.07
	bp allocated:    33963520      avg:  75981     compression:   1.06
	bp deduped:             0    ref>1:      0   deduplication:   1.00
	SPA allocated:   33987072     used:  0.80%

	additional, non-pointer bps of type 0:         76
	Dittoed blocks on same vdev: 115

==

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: loli10K <ezomori.nozomu@gmail.com>
Signed-off-by: Chunwei Chen <david.chen@nutanix.com>
Closes #7099
2018-02-09 10:05:25 -08:00
..
2017-11-18 14:08:00 -08:00
2017-08-14 10:36:48 -07:00
2017-06-26 14:36:49 -07:00
2017-11-15 17:27:01 -08:00
2018-02-08 15:28:18 -08:00
2017-11-15 17:27:01 -08:00
2017-08-14 10:36:48 -07:00
2017-10-11 16:54:48 -04:00
2017-11-15 17:27:01 -08:00
2017-11-15 17:27:01 -08:00
2017-01-03 11:31:18 -06:00
2017-10-10 16:41:47 -07:00
2018-01-25 13:40:38 -08:00
2017-07-13 13:54:00 -04:00
2016-11-29 14:34:33 -08:00
2018-01-25 13:40:38 -08:00
2017-11-15 17:27:01 -08:00
2018-02-08 15:28:18 -08:00
2018-02-08 15:28:18 -08:00
2017-03-10 09:51:33 -08:00
2017-08-09 15:31:08 -07:00
2017-01-03 11:31:18 -06:00
2017-09-19 12:19:08 -07:00
2017-11-18 14:08:00 -08:00