svn commit: r354962 - vendor-sys/illumos/dist/uts/common/fs/zfs

Andriy Gapon avg at FreeBSD.org
Thu Nov 21 14:14:09 UTC 2019


Author: avg
Date: Thu Nov 21 14:14:08 2019
New Revision: 354962
URL: https://svnweb.freebsd.org/changeset/base/354962

Log:
  disabled resilver_defer feature leads to looping resilvers
  
  illumos/illumos-gate at 233f6c49954dadfb21fa0809febd15e2160e0ff5
  https://github.com/illumos/illumos-gate/commit/233f6c49954dadfb21fa0809febd15e2160e0ff5
  
  Note: unusually for illumos this commit does not have a bug ID.
  
  Author: Kody Kantor <kody at kkantor.com>

Modified:
  vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_scan.c

Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_scan.c
==============================================================================
--- vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_scan.c	Thu Nov 21 14:10:53 2019	(r354961)
+++ vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_scan.c	Thu Nov 21 14:14:08 2019	(r354962)
@@ -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.
  */
 
@@ -920,13 +920,15 @@ dsl_scan_done(dsl_scan_t *scn, boolean_t complete, dmu
 		 * 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);
+			}
 		}
 	}
 


More information about the svn-src-all mailing list