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
This commit is contained in:
Isaac Huang
2017-05-12 18:28:03 -06:00
committed by Brian Behlendorf
parent 8c54ddd33a
commit 3d6da72d18
10 changed files with 125 additions and 33 deletions
+2
View File
@@ -88,6 +88,7 @@ vdev_ops_t vdev_missing_ops = {
NULL,
NULL,
NULL,
NULL,
VDEV_TYPE_MISSING, /* name of this vdev type */
B_TRUE /* leaf vdev */
};
@@ -101,6 +102,7 @@ vdev_ops_t vdev_hole_ops = {
NULL,
NULL,
NULL,
NULL,
VDEV_TYPE_HOLE, /* name of this vdev type */
B_TRUE /* leaf vdev */
};