]> git.proxmox.com Git - mirror_zfs.git/commit - module/zfs/vdev_raidz.c
Skip spurious resilver IO on raidz vdev
authorIsaac Huang <he.huang@intel.com>
Sat, 13 May 2017 00:28:03 +0000 (18:28 -0600)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Sat, 13 May 2017 00:28:03 +0000 (17:28 -0700)
commit3d6da72d183dc655a7dc8fd59f57748fc5c1806c
treeca6da500e5b88a5beaf9d4ef265eeb5964ff1a36
parent8c54ddd33af92e5defc587a10914493ca85ad60c
Skip spurious resilver IO on raidz vdev

On a raidz vdev, a block that does not span all child vdevs, excluding
its skip sectors if any, may not be affected by a child vdev outage or
failure. In such cases, the block does not need to be resilvered.
However, current resilver algorithm simply resilvers all blocks on a
degraded raidz vdev. Such spurious IO is not only wasteful, but also
adds the risk of overwriting good data.

This patch eliminates such spurious IOs.

Reviewed-by: Gvozden Neskovic <neskovic@gmail.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Signed-off-by: Isaac Huang <he.huang@intel.com>
Closes #5316
include/sys/vdev.h
include/sys/vdev_impl.h
module/zfs/dsl_scan.c
module/zfs/vdev.c
module/zfs/vdev_disk.c
module/zfs/vdev_file.c
module/zfs/vdev_mirror.c
module/zfs/vdev_missing.c
module/zfs/vdev_raidz.c
module/zfs/vdev_root.c