From owner-svn-src-all@freebsd.org Fri Aug 5 16:23:31 2016 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 1795EBB022A; Fri, 5 Aug 2016 16:23:31 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id F11D01D5C; Fri, 5 Aug 2016 16:23:30 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id E5316135B; Fri, 5 Aug 2016 16:23:30 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 9E17524209; Fri, 5 Aug 2016 16:23:30 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id 7OuIsVV8U_rH; Fri, 5 Aug 2016 16:23:27 +0000 (UTC) Subject: Re: svn commit: r303763 - in head/sys/cddl: compat/opensolaris/sys contrib/opensolaris/uts/common/fs/zfs contrib/opensolaris/uts/common/fs/zfs/sys DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 038F8241F1 To: Andriy Gapon References: <201608050623.u756N695018889@repo.freebsd.org> <20160805155352.GO43509@FreeBSD.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <6dd5a35d-4218-d054-2a55-f6250f2c7ad6@FreeBSD.org> Date: Fri, 5 Aug 2016 09:23:26 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <20160805155352.GO43509@FreeBSD.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="WFmLqA8kUXTLa7wxv8p2ENQU2XRwCw5uE" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 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, 05 Aug 2016 16:23:31 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --WFmLqA8kUXTLa7wxv8p2ENQU2XRwCw5uE Content-Type: multipart/mixed; boundary="DFTbOav9PxOXc8mjDKit9H1DXVAjwIMtr" From: Bryan Drewery To: Andriy Gapon Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <6dd5a35d-4218-d054-2a55-f6250f2c7ad6@FreeBSD.org> Subject: Re: svn commit: r303763 - in head/sys/cddl: compat/opensolaris/sys contrib/opensolaris/uts/common/fs/zfs contrib/opensolaris/uts/common/fs/zfs/sys References: <201608050623.u756N695018889@repo.freebsd.org> <20160805155352.GO43509@FreeBSD.org> In-Reply-To: <20160805155352.GO43509@FreeBSD.org> --DFTbOav9PxOXc8mjDKit9H1DXVAjwIMtr Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 8/5/2016 8:53 AM, Glen Barber wrote: > On Fri, Aug 05, 2016 at 06:23:06AM +0000, Andriy Gapon wrote: >> Author: avg >> Date: Fri Aug 5 06:23:06 2016 >> New Revision: 303763 >> URL: https://svnweb.freebsd.org/changeset/base/303763 >> >> Log: >> zfs: honour and make use of vfs vnode locking protocol >> =20 >> ZFS POSIX Layer is originally written for Solaris VFS which is very >> different from FreeBSD VFS. Most importantly many things that FreeB= SD VFS >> manages on behalf of all filesystems are implemented in ZPL in a dif= ferent >> way. >> Thus, ZPL contains code that is redundant on FreeBSD or duplicates V= FS >> functionality or, in the worst cases, badly interacts / interferes >> with VFS. >> =20 >> The most prominent problem is a deadlock caused by the lock order re= versal >> of vnode locks that may happen with concurrent zfs_rename() and look= up(). >> The deadlock is a result of zfs_rename() not observing the vnode loc= king >> contract expected by VFS. >> =20 >> This commit removes all ZPL internal locking that protects parent-ch= ild >> relationships of filesystem nodes. These relationships are protecte= d >> by vnode locks and the code is changed to take advantage of that fac= t >> and to properly interact with VFS. >> =20 >> Removal of the internal locking allowed all ZPL dmu_tx_assign calls = to >> use TXG_WAIT mode. >> =20 >> Another victim, disputable perhaps, is ZFS support for filesystems w= ith >> mixed case sensitivity. That support is not provided by the OS anyw= ay, >> so in ZFS it was a buch of dead code. >> =20 >> 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 >> =20 >> PR: 209158 >> Reported by: many >> Tested by: many (thank you all!) >> MFC after: 5 days >> Sponsored by: HybridCluster / ClusterHQ >> Differential Revision: https://reviews.freebsd.org/D6533 >> >=20 > Thank you very much for working on this. >=20 Yes agreed. It scares me, but releasing with trivial deadlocks that we cannot EN due to that risk scares me more. FreeBSD's ZFS is a huge selling point for it and we want to maintain that. --=20 Regards, Bryan Drewery --DFTbOav9PxOXc8mjDKit9H1DXVAjwIMtr-- --WFmLqA8kUXTLa7wxv8p2ENQU2XRwCw5uE Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJXpL1+AAoJEDXXcbtuRpfPF5MH/01vCg/Q9aDuvctDPse7hzkO MMT/DHSB+6nEnUtUrwOOzkT3GmTzVXS6jiju8GY1dr9n6ldf1Z+vkJgNchi4NA7L Df9GxXreS6S1oQgLmK6LloVMG8ivmJQYB20XGqqwb9qfdzwlY/Inmef/sffShqz3 cYudMEhvw0OlDiwcsnrGELVHvKNkEaT/pFW9cbIwC0Ofy4UPCwjLJddwfMMNYG3S uMogdcg7h7MZdM2SOAP0lkdEqQOahb8MW4t/yicts9CWR6GgawGKVXHjQHiNkGdf v/mgG3pCnwqZaxUfyrDBml0qJO5iAKyAA1Wz1cbrruzM0ZKmbCEWPkw7sHVzAe0= =Mj/m -----END PGP SIGNATURE----- --WFmLqA8kUXTLa7wxv8p2ENQU2XRwCw5uE--