Date: Fri, 5 Aug 2016 09:23:26 -0700 From: Bryan Drewery <bdrewery@FreeBSD.org> To: Andriy Gapon <avg@FreeBSD.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@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 Message-ID: <6dd5a35d-4218-d054-2a55-f6250f2c7ad6@FreeBSD.org> In-Reply-To: <20160805155352.GO43509@FreeBSD.org> References: <201608050623.u756N695018889@repo.freebsd.org> <20160805155352.GO43509@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --WFmLqA8kUXTLa7wxv8p2ENQU2XRwCw5uE Content-Type: multipart/mixed; boundary="DFTbOav9PxOXc8mjDKit9H1DXVAjwIMtr" From: Bryan Drewery <bdrewery@FreeBSD.org> To: Andriy Gapon <avg@FreeBSD.org> 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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6dd5a35d-4218-d054-2a55-f6250f2c7ad6>