]> git.proxmox.com Git - mirror_zfs.git/commit
Multiple DVA Scrubbing Fix
authorTom Caputi <tcaputi@datto.com>
Fri, 15 Mar 2019 21:14:31 +0000 (17:14 -0400)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 15 Mar 2019 21:14:31 +0000 (14:14 -0700)
commitab7615d92c9bf4bdbbc6a675724b763d16f05280
tree4a61231e1be8887feb8cf3ccdae070a016cc45b7
parent2bbec1c910a24bf61c6f41e0762e50face4b8907
Multiple DVA Scrubbing Fix

Currently, there is an issue in the sequential scrub code which
prevents self healing from working in some cases. The scrub code
will split up all DVA copies of a bp and issue each of them
separately. The problem is that, since each of the DVAs is no
longer associated with the others, the self healing code doesn't
have the opportunity to repair problems that show up in one of the
DVAs with the data from the others.

This patch fixes this issue by ensuring that all IOs issued by the
sequential scrub code include all DVAs. Initially, only the first
DVA of each is attempted. If an issue arises, the IO is retried
with all available copies, giving the self healing code a chance
to correct the issue.

To test this change, this patch also adds the ability for zinject
to specify individual DVAs to inject read errors into. We then
add a new test case that utilizes this functionality to ensure
scrubs and self-healing reads can handle and transparently fix
issues with individual copies of blocks.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Matt Ahrens <mahrens@delphix.com>
Signed-off-by: Tom Caputi <tcaputi@datto.com>
Closes #8453
cmd/zinject/zinject.c
include/sys/zfs_ioctl.h
man/man8/zinject.8
module/zfs/dsl_scan.c
module/zfs/vdev_mirror.c
module/zfs/zio_inject.c
tests/runfiles/linux.run
tests/zfs-tests/tests/functional/cli_root/zpool_scrub/Makefile.am
tests/zfs-tests/tests/functional/cli_root/zpool_scrub/zpool_scrub_multiple_copies.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zpool_scrub/zpool_scrub_offline_device.ksh