]> git.proxmox.com Git - mirror_zfs.git/commit - module/zfs/vdev_indirect.c
ztest: split block reconstruction
authorBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 16 Jan 2019 22:10:02 +0000 (14:10 -0800)
committerGitHub <noreply@github.com>
Wed, 16 Jan 2019 22:10:02 +0000 (14:10 -0800)
commit64bdf63f5cceb6ea6b7e199c79a8ac3e37cdbf13
tree4a81773f5a691ffc3a2a969efca001b99baf5f18
parentdb587941c5ff6dea01932bb78f70db63cf7f38ba
ztest: split block reconstruction

Increase the default allowed number of reconstruction attempts.
There's not an exact right number for this setting.  It needs
to be set large enough to cover any realistic failure scenarios
and small enough to avoid stalling the IO pipeline and invoking
the dead man detection.

The current value of 256 was empirically determined to be too
low based on multi-day runs of ztest.  The fault injection code
would inject more damage than could be reconstructed given the
relatively small number of attempts.  However, in all observed
cases the block could be reconstructed using a slightly higher
limit.

Based on local testing increasing the default value to 4096 was
determined to strike the best balance.  Checking all combinations
takes less than 10s in the worst case, and has so far eliminated
the vast majority of false positives detected by ztest.  This
delay is roughly on par with how long retries may be performed
to a misbehaving HDD and was deemed to be reasonable.  Better to
err on the side of a brief delay rather than fail to reconstruct
the data.

Lastly, the -Y flag has been added to zdb to make it easy to try all
possible combinations when performing split block reconstruction.
For badly damaged blocks with 18 splits, they can be fully enumerated
within a few minutes.  This has been done to ensure permanent errors
are never incorrectly reported when ztest verifies the pool with zdb.

Reviewed by: Tom Caputi <tcaputi@datto.com>
Reviewed by: Matt Ahrens <mahrens@delphix.com>
Reviewed by: Serapheim Dimitropoulos <serapheim@delphix.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #8271
cmd/zdb/zdb.c
cmd/ztest/ztest.c
man/man5/zfs-module-parameters.5
man/man8/zdb.8
module/zfs/vdev_indirect.c