]> granicus.if.org Git - zfs/commitdiff
OpenZFS 9700 - ZFS resilvered mirror does not balance reads
authorJerry Jelinek <jerry.jelinek@joyent.com>
Thu, 30 Aug 2018 13:13:30 +0000 (13:13 +0000)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 2 Oct 2018 23:18:24 +0000 (16:18 -0700)
Authored by: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: Toomas Soome <tsoome@me.com>
Reviewed by: Sanjay Nadkarni <sanjay.nadkarni@nexenta.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Richard Elling <Richard.Elling@RichardElling.com>
Approved by: Matthew Ahrens <mahrens@delphix.com>
Ported-by: Brian Behlendorf <behlendorf1@llnl.gov>
OpenZFS-issue: https://illumos.org/issues/9700
OpenZFS-commit: https://github.com/openzfs/openzfs/commit/82f63c3c
Closes #7973

module/zfs/spa.c

index eaca2d29e640870cc2d283bcce2007a60d98d21a..ad8000914db40a0e5295258c58695b6cf9710764 100644 (file)
@@ -28,6 +28,7 @@
  * Copyright (c) 2014 Integros [integros.com]
  * Copyright 2016 Toomas Soome <tsoome@me.com>
  * Copyright (c) 2016 Actifio, Inc. All rights reserved.
+ * Copyright 2018 Joyent, Inc.
  * Copyright (c) 2017 Datto Inc.
  * Copyright 2017 Joyent, Inc.
  * Copyright (c) 2017, Intel Corporation.
@@ -6703,6 +6704,7 @@ spa_vdev_resilver_done_hunt(vdev_t *vd)
 
        /*
         * Check for a completed resilver with the 'unspare' flag set.
+        * Also potentially update faulted state.
         */
        if (vd->vdev_ops == &vdev_spare_ops) {
                vdev_t *first = vd->vdev_child[0];
@@ -6724,6 +6726,8 @@ spa_vdev_resilver_done_hunt(vdev_t *vd)
                    !vdev_dtl_required(oldvd))
                        return (oldvd);
 
+               vdev_propagate_state(vd);
+
                /*
                 * If there are more than two spares attached to a disk,
                 * and those spares are not required, then we want to