From owner-svn-src-stable@freebsd.org Thu Aug 11 22:52:05 2016 Return-Path: Delivered-To: svn-src-stable@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 692E0BB7C4C; Thu, 11 Aug 2016 22:52:05 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (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 24CD814A1; Thu, 11 Aug 2016 22:52:05 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1bXypW-000Pex-SU; Fri, 12 Aug 2016 01:52:02 +0300 Date: Fri, 12 Aug 2016 01:52:02 +0300 From: Slawa Olhovchenkov To: Glen Barber Cc: Andriy Gapon , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: Re: svn commit: r303970 - in stable/11/sys/cddl: compat/opensolaris/sys contrib/opensolaris/uts/common/fs/zfs contrib/opensolaris/uts/common/fs/zfs/sys Message-ID: <20160811225202.GI8192@zxy.spb.ru> References: <201608112048.u7BKm4OH076291@repo.freebsd.org> <20160811223331.GF22212@zxy.spb.ru> <20160811223637.GE51184@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160811223637.GE51184@FreeBSD.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Aug 2016 22:52:05 -0000 On Thu, Aug 11, 2016 at 10:36:37PM +0000, Glen Barber wrote: > On Fri, Aug 12, 2016 at 01:33:31AM +0300, Slawa Olhovchenkov wrote: > > On Thu, Aug 11, 2016 at 08:48:04PM +0000, Andriy Gapon wrote: > > > > > Author: avg > > > Date: Thu Aug 11 20:48:03 2016 > > > New Revision: 303970 > > > URL: https://svnweb.freebsd.org/changeset/base/303970 > > > > > > Log: > > > MFC r303763,303791,303869: zfs: honour and make use of vfs vnode locking protocol > > > > > > ZFS POSIX Layer is originally written for Solaris VFS which is very > > > different from FreeBSD VFS. Most importantly many things that FreeBSD VFS > > > manages on behalf of all filesystems are implemented in ZPL in a different > > > way. > > > Thus, ZPL contains code that is redundant on FreeBSD or duplicates VFS > > > functionality or, in the worst cases, badly interacts / interferes > > > with VFS. > > > > > > The most prominent problem is a deadlock caused by the lock order reversal > > > of vnode locks that may happen with concurrent zfs_rename() and lookup(). > > > The deadlock is a result of zfs_rename() not observing the vnode locking > > > contract expected by VFS. > > > > > > This commit removes all ZPL internal locking that protects parent-child > > > relationships of filesystem nodes. These relationships are protected > > > by vnode locks and the code is changed to take advantage of that fact > > > and to properly interact with VFS. > > > > > > Removal of the internal locking allowed all ZPL dmu_tx_assign calls to > > > use TXG_WAIT mode. > > > > > > Another victim, disputable perhaps, is ZFS support for filesystems with > > > mixed case sensitivity. That support is not provided by the OS anyway, > > > so in ZFS it was a buch of dead code. > > > > > > To do: > > > - replace ZFS_ENTER mechanism with VFS managed / visible mechanism > > > - replace zfs_zget with zfs_vget[f] as much as possible > > > - get rid of not really useful now zfs_freebsd_* adapters > > > - more cleanups of unneeded / unused code > > > - fix / replace .zfs support > > > > MFC to 10.x/9.x planed? > > > > As I understand it, this does not affect stable/10. Sure? I think ZFS/VFS layers don't change between 9.x and 11.x