Date: Fri, 20 Mar 2009 11:12:46 -0400 From: John Nielsen <lists@jnielsen.net> To: freebsd-current@freebsd.org Cc: Pawel Jakub Dawidek <pjd@freebsd.org>, Attilio Rao <attilio@freebsd.org>, Tim Kientzle <kientzle@freebsd.org>, Mark Powell <M.S.Powell@salford.ac.uk>, Anonymous <swell.k@gmail.com>, Peter Schuller <peter.schuller@infidyne.com> Subject: Re: repeatable ZFS panic: share->excl Message-ID: <200903201112.47569.lists@jnielsen.net> In-Reply-To: <200903181209.18970.jhb@freebsd.org> References: <20090312175345.Y80227@rust.salford.ac.uk> <20090317070440.GE2012@garage.freebsd.pl> <200903181209.18970.jhb@freebsd.org>
index | next in thread | previous in thread | raw e-mail
On Wednesday 18 March 2009 12:09:18 pm John Baldwin wrote: > On Tuesday 17 March 2009 3:04:40 am Pawel Jakub Dawidek wrote: > > On Fri, Mar 13, 2009 at 02:08:03PM -0400, John Baldwin wrote: > > > John Baldwin wrote: > > > >Yes, I think that is the real bug. Looking at this further I > > > > think zfs_get_xattrdir() will return the vnode locked if it has > > > > to create a new node via zfs_make_attrdir() but only returns it > > > > held and unlocked if it finds an existing one. So my new patch > > > > is to just fix zfs_get_xattrdir() to unlock the vnode if it > > > > creates a new one like so: > > > > > > > >(Sorry, TBird is probably going to butcher all the whitespace): > > > > > > > >--- > > > >//depot/user/jhb/lock/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_d > >ir.c > > > > > >+++ > > > >/Users/jhb/work/p4/lock/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs > >_dir.c > > > > > >@@ -940,6 +940,7 @@ > > > > /* NB: we already did dmu_tx_wait() if necessary */ > > > > goto top; > > > > } > > > >+ VOP_UNLOCK(*xvpp, 0); > > > > > > > > return (error); > > > > } > > > > > > > >A non-butchered version is at > > > > www.FreeBSD.org/~jhb/patches/zfs_ea.patch. > > > > > > So lulf@ reports success with this patch. Pawel, can you review > > > it? > > > > Yes, it works for me too and looks good. The only thing we need to > > change is to check for error beeing 0 before unlocking the vnode. > > The zfs_make_xattrdir() function can still return with EIO, so I'd > > add something like this: > > > > if (error == 0) > > VOP_UNLOCK(*xvpp, 0); > > Yes, I realized this about 30 minutes after I sent this e-mail. :-P I > will commit a version with the error check today. > > > Thank you John for spending time on tracking this one down. > > Sure, was good to read a bit of the ZFS code. I had a chance to test this patch today and it looks good. Which is to say my system hasn't hung yet. :) I built world from 3/19 -HEAD and was able to "lsextattr -h user" on files on a ZFS without any ill effects. I un-patched libarchive (so it uses extended attributes again) and rebuilt and reinstalled it and bsdtar and was able to do portupgrades normally. Thanks to all involved. JNhome | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200903201112.47569.lists>
