Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Sep 2021 07:05:11 -0600
From:      Alan Somers <asomers@freebsd.org>
To:        Andriy Gapon <avg@freebsd.org>
Cc:        freebsd-fs <fs@freebsd.org>
Subject:   Re: vfs.zfs.vol.recursive completely broken, time to remove?
Message-ID:  <CAOtMX2guaaAUsyi0BSxdBL9qRrS%2BXC6bGNhpqXf6F9JJXA973w@mail.gmail.com>
In-Reply-To: <10583cba-c2f5-ffbe-5a1b-8dfcd8114b4d@FreeBSD.org>
References:  <10583cba-c2f5-ffbe-5a1b-8dfcd8114b4d@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Sep 29, 2021 at 12:10 AM Andriy Gapon <avg@freebsd.org> wrote:
>
>
> It seems that while previously there could sometimes be a deadlock with
> vfs.zfs.vol.recursive=1, now it is guaranteed.
>
> There was an OpenZFS change to use a pool of threads for vdev opening (to
> parallelize / speed up).  When such a thread opens a zvol it needs to acquire
> spa_namespace_lock.  But the lock is already held by a thread requesting the
> operation such as a thread doing zpool import (spa_load).
> So, it's an obvious deadlock: the main thread is waiting for the workers while
> holding the namespace lock, at least one of the workers is blocked on the same lock.

The last time I tried that there was pushback from a lot of different
people.  I think we need to fix it instead.  Here's the beginning of
that flame war.
https://docs.freebsd.org/cgi/getmsg.cgi?fetch=1031189+0+archive/2016/svn-src-all/20160124.svn-src-all



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOtMX2guaaAUsyi0BSxdBL9qRrS%2BXC6bGNhpqXf6F9JJXA973w>