From owner-svn-src-all@freebsd.org Fri Aug 21 08:34:32 2015 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 F01DE9BF8A0; Fri, 21 Aug 2015 08:34:32 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id CC29DDD4; Fri, 21 Aug 2015 08:34:31 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id LAA21502; Fri, 21 Aug 2015 11:34:29 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1ZShmP-000Dar-5k; Fri, 21 Aug 2015 11:34:29 +0300 Subject: Re: svn commit: r286985 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs To: src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <201508210817.t7L8Hj26043731@repo.freebsd.org> From: Andriy Gapon Message-ID: <55D6E25E.5030007@FreeBSD.org> Date: Fri, 21 Aug 2015 11:33:34 +0300 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <201508210817.t7L8Hj26043731@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 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: Fri, 21 Aug 2015 08:34:33 -0000 On 21/08/2015 11:17, Andriy Gapon wrote: > Author: avg > Date: Fri Aug 21 08:17:44 2015 > New Revision: 286985 > URL: https://svnweb.freebsd.org/changeset/base/286985 > > Log: > try to fix lor between z_teardown_lock and spa_namespace_lock > > The lock order reversal and a resulting deadlock were introduced > in r285021 / D2865. The problem is that zfs_register_callbacks() calls > dsl_prop_get_integer() that has to acquire spa_namespace_lock. > At the same time, spa_config_sync() is called with spa_namespace_lock > held and then it performs ZFS vnode operations that acquire > z_teardown_lock in the reader mode. > > So, fix the problem by using dsl_prop_get_int_ds() instead of > dsl_prop_get_integer(). The former does not need to look up > the pool and the dataset by name. > > Reported by: many > Reviewed by: delphij > Tested by: delphij, Jens Schweikhardt > MFC after: 5 days > X-MFC with: r285021 Differential Revision: https://reviews.freebsd.org/D3281 -- Andriy Gapon