Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: fs tests failing



On Sat, Sep 01, 2012 at 06:04:47PM +0200, Antti Kantee wrote:
> On 01.09.2012 17:42, Chuck Silvers wrote:
> >>Yes.  And with my older (well, prehistoric ;) versions of the
> >>drivers, "only" 20 or so of the tests resulted in a kernel panic
> >>while the rest passed.  So I'm hoping someone with more recent vfs
> >>familiarity than myself can tell of the top of their head why a
> >>namei on zfs results in this:
> >>
> >>panic: kernel diagnostic assertion "VOP_ISLOCKED(*newsearchdir_ret)
> >>== LK_EXCLUSIVE" failed
> >
> >
> >int
> >zfs_netbsd_lock(void *v)
> >{
> >     struct vop_lock_args *ap = v;
> >
> >     return 0;
> >}
> >
> >
> >our port of ZFS doesn't obey the BSD locking rules.  ZFS doesn't need
> >the BSD vnode lock for internal consistency since it does its own locking
> >internally, but the above check and possibly others have more recently
> >been added to ensure that file systems do the correct locking for the
> >fs-independent logic that relies on the BSD vnode lock.
> 
> Ah, ic, but islocked() comes from genfs.  Given the current
> situation, it is more sensible to make VOP_ISLOCKED() return
> LK_EXCLUSIVE unconditionally for ZFS and see if that gets DIAGNOSTIC
> builds a bit further.

no, that's completely wrong.  ZFS's VOP_LOCK() currently doesn't actually
lock anything, so having its VOP_ISLOCKED() say that it did is just crazy.
all that does is defeat the assertions which are correctly pointing out
that ZFS has a bug.

if you want to try to improve the situation, change all of the ZFS VOP_*LOCK*
to use the genfs ones.  I don't know whether or not that will be sufficient,
but it will at least be a step in the right direction.

-Chuck


Home | Main Index | Thread Index | Old Index