From owner-svn-src-all@freebsd.org Thu Oct 19 16:36:08 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 99985E3FEF3; Thu, 19 Oct 2017 16:36:08 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 63868700F9; Thu, 19 Oct 2017 16:36:08 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v9JGa7H1035427; Thu, 19 Oct 2017 16:36:07 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v9JGa7Nf035426; Thu, 19 Oct 2017 16:36:07 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201710191636.v9JGa7Nf035426@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 19 Oct 2017 16:36:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r324757 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 324757 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Oct 2017 16:36:08 -0000 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: