From owner-freebsd-fs@FreeBSD.ORG Mon May 20 09:05:08 2013 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 2A590B6; Mon, 20 May 2013 09:05:08 +0000 (UTC) (envelope-from antoine.brodin.freebsd@gmail.com) Received: from mail-wi0-x233.google.com (mail-wi0-x233.google.com [IPv6:2a00:1450:400c:c05::233]) by mx1.freebsd.org (Postfix) with ESMTP id 92AFE644; Mon, 20 May 2013 09:05:07 +0000 (UTC) Received: by mail-wi0-f179.google.com with SMTP id hq7so1866478wib.0 for ; Mon, 20 May 2013 02:05:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=WdRSkbd1tuTQdeo1HFHmNWxJI1+yzeJE7re0i1zKpQ4=; b=gZb2rifyLfskSvgtiXMStkWM0OT2Fjx7b/iuJ/bWfaTPULYWvFl3UT/GEsrhVD69N3 Odgvx1XMGaVOEMtSaw92gDzRM7UY3kFbhorLlYiny3mEq9KxU5+USU/oEdZpek6cy+AD LU7lxKr51gMHBwditzfWswUC921O1o6XHF+wPmE/1SGWQDVIKQzhBAO2J0Wj/wgylK4j R7TsBDrJmNLQyt+C+Brp6cdX6hJDS2FALPut5QZwuUamZ5wtthjhjbSGTOSS47oZoQcZ Fx4ElHQ1gNYMsuRaeRvWw4mgOzNys7DwOmgAaGFbfQ8nfifwconJV8WRjmwAgX+PSZMM pYcA== MIME-Version: 1.0 X-Received: by 10.180.21.167 with SMTP id w7mr11833635wie.2.1369040706804; Mon, 20 May 2013 02:05:06 -0700 (PDT) Sender: antoine.brodin.freebsd@gmail.com Received: by 10.194.91.143 with HTTP; Mon, 20 May 2013 02:05:06 -0700 (PDT) In-Reply-To: <20130520073426.GY3047@kib.kiev.ua> References: <20130520073426.GY3047@kib.kiev.ua> Date: Mon, 20 May 2013 09:05:06 +0000 X-Google-Sender-Auth: kpWw6tq5ffhqVKbEEydQxgrQnLM Message-ID: Subject: Re: Nullfs - Panic when umounting and lower fs has been removed From: Antoine Brodin To: Konstantin Belousov Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-fs@freebsd.org, pho@freebsd.org X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 May 2013 09:05:08 -0000 On Mon, May 20, 2013 at 7:34 AM, Konstantin Belousov wrote: > This is strange, do you have witness enabled, but invariants not ? > > Please try the following change. > > diff --git a/sys/fs/nullfs/null_vfsops.c b/sys/fs/nullfs/null_vfsops.c > index ad02236..bece8c8 100644 > --- a/sys/fs/nullfs/null_vfsops.c > +++ b/sys/fs/nullfs/null_vfsops.c > @@ -417,8 +417,13 @@ nullfs_unlink_lowervp(struct mount *mp, struct vnode *lowervp) > */ > if (vp->v_usecount == 0) { > KASSERT((vp->v_iflag & VI_DOOMED) != 0, > - ("not reclaimed %p", vp)); > + ("not reclaimed nullfs vnode %p", vp)); > VOP_UNLOCK(vp, 0); > + } else { > + ASSERT_VOP_ELOCKED(vp, "unlink_lowervp"); > + KASSERT((vp->v_iflag & VI_DOOMED) == 0, > + ("reclaimed nullfs vnode %p", vp)); > + xp->null_flags &= ~NULLV_NOUNLOCK; > } > vdrop(vp); > } I have both witness and invariants. And this patch fixes the panic. Thanks! Antoine