From owner-freebsd-current@FreeBSD.ORG Sun Mar 29 16:29:16 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 35FBF1065670; Sun, 29 Mar 2009 16:29:16 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from kientzle.com (kientzle.com [66.166.149.50]) by mx1.freebsd.org (Postfix) with ESMTP id 93A588FC12; Sun, 29 Mar 2009 16:29:15 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: (from root@localhost) by kientzle.com (8.14.3/8.14.3) id n2TGTE3M077021; Sun, 29 Mar 2009 09:29:14 -0700 (PDT) (envelope-from kientzle@freebsd.org) Received: from dark.x.kientzle.com (fw2.kientzle.com [10.123.1.2]) by kientzle.com with SMTP id i3ppnv34i4ppvntihnffqip43a; Sun, 29 Mar 2009 09:29:14 -0700 (PDT) (envelope-from kientzle@freebsd.org) Message-ID: <49CFA1D9.1020604@freebsd.org> Date: Sun, 29 Mar 2009 09:29:13 -0700 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8.1.19) Gecko/20090226 SeaMonkey/1.1.14 MIME-Version: 1.0 To: Pawel Jakub Dawidek References: <20090312175345.Y80227@rust.salford.ac.uk> <20090312191333.GA97342@hyperion.scode.org> <49B97617.8010709@freebsd.org> <86r6124f2v.fsf@gmail.com> <3bbf2fe10903122035i20b2767cod2322c39c6f850ee@mail.gmail.com> <29C8FA04-D5B1-49B7-ACF0-4185537367B0@baldwin.cx> <3bbf2fe10903122156u650417f0s5c49b68bdf4ffa07@mail.gmail.com> <49BA9801.5080505@FreeBSD.org> <49BAA103.2060508@FreeBSD.org> <20090317070440.GE2012@garage.freebsd.pl> In-Reply-To: <20090317070440.GE2012@garage.freebsd.pl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Attilio Rao , "freebsd-current@freebsd.org" , Mark Powell , Anonymous , Peter Schuller Subject: Re: repeatable ZFS panic: share->excl X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Mar 2009 16:29:16 -0000 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_dir.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); > > Thank you John for spending time on tracking this one down. Any estimate on when this can be committed? I'm waiting to re-enable the extended attribute archiving support in tar until this is fixed. Tim