Drop of spa_namespace lock in vdev_geom.c

Justin T. Gibbs gibbs at FreeBSD.org
Fri Jun 10 18:07:48 UTC 2011

Dropping and reacquiring the spa_namespace lock in vdev_geom_open()
creates a lock order reversal with the spa_config locks.  As the
spa_config locks are not standard mutexes, witness will not warn
about this issue.  I only noticed this problem when debugging a ZFS
deadlock.  The deadlock can be triggered anytime that there are
multiple insert/remove processes going on (e.g. vdev orphan processing
while a fault management daemon is onlining a replacement device for
some other vdev).

I haven't noticed any issues with just holding the namespace lock
for the duration of the open.  Does anyone know why this lock drop
was added in v28?


More information about the freebsd-fs mailing list