]> granicus.if.org Git - zfs/commitdiff
OpenZFS 9434 - Speculative prefetch is blocked by device removal code
authorAlexander Motin <mav@FreeBSD.org>
Tue, 3 Apr 2018 18:57:15 +0000 (14:57 -0400)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 30 Apr 2018 20:05:55 +0000 (13:05 -0700)
Device removal code does not set spa_indirect_vdevs_loaded for pools
that never experienced device removal.  At least one visual consequence
of it is completely blocked speculative prefetcher.  This patch sets
the variable in such situations.

Authored by: Alexander Motin <mav@FreeBSD.org>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Prashanth Sreenivasa <pks@delphix.com>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Tim Chase <tim@chase2k.com>
Approved by: Matt Ahrens <mahrens@delphix.com>
Ported-by: Giuseppe Di Natale <dinatale2@llnl.gov>
OpenZFS-issue: https://www.illumos.org/issues/9434
OpenZFS-commit: https://github.com/openzfs/openzfs/commit/16127b627b
Closes #7480

module/zfs/vdev_removal.c

index 0fca8fb03f2da00d7f1cbe80f99bcfc2b3fb70da..826e5c421a6c6a1cf34b77211be555ab7d6292f6 100644 (file)
@@ -352,6 +352,7 @@ spa_remove_init(spa_t *spa)
                spa->spa_removing_phys.sr_state = DSS_NONE;
                spa->spa_removing_phys.sr_removing_vdev = -1;
                spa->spa_removing_phys.sr_prev_indirect_vdev = -1;
+               spa->spa_indirect_vdevs_loaded = B_TRUE;
                return (0);
        } else if (error != 0) {
                return (error);