svn commit: r324757 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

Andriy Gapon avg at FreeBSD.org
Thu Oct 19 16:36:08 UTC 2017


Author: avg
Date: Thu Oct 19 16:36:07 2017
New Revision: 324757
URL: https://svnweb.freebsd.org/changeset/base/324757

Log:
  remove spa_sync_on assert from spa_async_thread_vd
  
  Unlike spa_async_thread that can get started only from spa_sync()
  spa_async_thread_vd can get started from other contexts.
  Additionally, spa_async_thread_vd does not really depend on
  spa sync being enabled.
  
  The incorrect assert could be triggered by importing a pool in the
  read-only mode and then disconnecting one of its disks.
  In this case spa_sync_on was false because the pool was read-only
  and spa_async_thread_vd was started to handle SPA_ASYNC_REMOVE event.
  
  Note: spa_async_thread_vd() currently exists only in FreeBSD, it was
  split out of spa_async_thread() in r253990.
  
  Discussed with:	mav
  MFC after:	2 weeks

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c	Thu Oct 19 16:16:26 2017	(r324756)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c	Thu Oct 19 16:36:07 2017	(r324757)
@@ -6247,8 +6247,6 @@ spa_async_thread_vd(void *arg)
 	spa_t *spa = arg;
 	int tasks;
 
-	ASSERT(spa->spa_sync_on);
-
 	mutex_enter(&spa->spa_async_lock);
 	tasks = spa->spa_async_tasks;
 retry:


More information about the svn-src-head mailing list