ZFS: Deadlock during vnode recycling

Fabian Keil freebsd-listen at fabiankeil.de
Mon Oct 8 13:11:50 UTC 2012


Andriy Gapon <avg at FreeBSD.org> wrote:

> In fact here is a real patch that I would like to propose:
> http://people.freebsd.org/~avg/zfs-getnewvnode_reserve.diff
> 
> The patch incorporates the kib's patch for extending VFS API that helps to avoid
> entering the vnode inactive/reclaim path from getnewvnode.
> 
> The patch should fix the problem reported in this thread and the problem from
> "panic: _sx_xlock_hard: recursed on non-recursive sx zfsvfs->z_hold_mtx ..."
> thread that runs in parallel.
> 
> Reviews and testing are welcome.

I'd probably replace the intentionally empty "else if (zp->z_unlinked)"
block in zfs_freebsd_reclaim() with a comment, but other than that the
patch looks good to me.

While I'm using nullfs on a couple of jails, I never experienced
the panic above and can thus only report that I didn't notice any
regressions so far since applying the patch yesterday.

Fabian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-fs/attachments/20121008/ff4a4587/signature.pgp


More information about the freebsd-fs mailing list