Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 May 2013 09:05:06 +0000
From:      Antoine Brodin <antoine@FreeBSD.org>
To:        Konstantin Belousov <kostikbel@gmail.com>
Cc:        freebsd-fs@freebsd.org, pho@freebsd.org
Subject:   Re: Nullfs - Panic when umounting and lower fs has been removed
Message-ID:  <CAALwa8mugo%2BM2RZBBJaJWfBYHcxaEpwM8u=CXBsW4o89FdiXXg@mail.gmail.com>
In-Reply-To: <20130520073426.GY3047@kib.kiev.ua>
References:  <CAALwa8nrUbErf9hghdFBOD0Y6yGWD5wYPqQ1Ef4qx_pp7E3Z%2BA@mail.gmail.com> <20130520073426.GY3047@kib.kiev.ua>

next in thread | previous in thread | raw e-mail | index | archive | help

On Mon, May 20, 2013 at 7:34 AM, Konstantin Belousov
<kostikbel@gmail.com> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAALwa8mugo%2BM2RZBBJaJWfBYHcxaEpwM8u=CXBsW4o89FdiXXg>