diff options
author | Kody A Kantor <kody@kkantor.com> | 2019-09-07 00:29:58 +0000 |
---|---|---|
committer | Kody A Kantor <kody@kkantor.com> | 2019-09-09 19:18:11 +0000 |
commit | b67d8733333b09a4f54e1f305953f4186981cdb4 (patch) | |
tree | 3adf1f2332d8ce7c92feb065539cfa473321bb5c | |
parent | b0dbab4410d7472fc05021b3e954c506b64b4190 (diff) | |
download | illumos-joyent-b67d8733333b09a4f54e1f305953f4186981cdb4.tar.gz |
OS-7982 disabled resilver_defer feature leads to looping resilvers
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Approved by: Jerry Jelinek <jerry.jelinek@joyent.com>
-rw-r--r-- | usr/src/uts/common/fs/zfs/dsl_scan.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/usr/src/uts/common/fs/zfs/dsl_scan.c b/usr/src/uts/common/fs/zfs/dsl_scan.c index 22e808dfd9..abe1220d3a 100644 --- a/usr/src/uts/common/fs/zfs/dsl_scan.c +++ b/usr/src/uts/common/fs/zfs/dsl_scan.c @@ -23,7 +23,7 @@ * Copyright (c) 2011, 2018 by Delphix. All rights reserved. * Copyright 2016 Gary Mills * Copyright (c) 2011, 2017 by Delphix. All rights reserved. - * Copyright 2017 Joyent, Inc. + * Copyright 2019 Joyent, Inc. * Copyright (c) 2017 Datto Inc. */ @@ -957,13 +957,15 @@ dsl_scan_done(dsl_scan_t *scn, boolean_t complete, dmu_tx_t *tx) * will find the drives that need to be resilvered * when the machine reboots and start the resilver then. */ - boolean_t resilver_needed = - dsl_scan_clear_deferred(spa->spa_root_vdev, tx); - if (resilver_needed) { - spa_history_log_internal(spa, - "starting deferred resilver", tx, - "errors=%llu", spa_get_errlog_size(spa)); - spa_async_request(spa, SPA_ASYNC_RESILVER); + if (spa_feature_is_enabled(spa, SPA_FEATURE_RESILVER_DEFER)) { + boolean_t resilver_needed = + dsl_scan_clear_deferred(spa->spa_root_vdev, tx); + if (resilver_needed) { + spa_history_log_internal(spa, + "starting deferred resilver", tx, + "errors=%llu", spa_get_errlog_size(spa)); + spa_async_request(spa, SPA_ASYNC_RESILVER); + } } } |