]> granicus.if.org Git - zfs/commit
Use a dedicated taskq for vdev_file
authorChunwei Chen <tuxoko@gmail.com>
Wed, 21 Dec 2016 18:47:15 +0000 (10:47 -0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 21 Dec 2016 18:47:15 +0000 (10:47 -0800)
commitda8f51e16aa4e1832f8c1a9ddc3082e4469b4485
treeafa7bb50215497f1bddfcfcfc71b95cb97ef428f
parent5f1346c29997dd4e02acf4c19c875d5484f33b1e
Use a dedicated taskq for vdev_file

The introduction of parallel zvol prefetch causes deadlock when using
vdev_file.

spa_async->(spa_namespace_lock)->txg_wait_synced->(wait for txg_sync)
txg_sync->zio_wait->(wait for vdev_file_io_fsync on system_taskq)
zvol_prefetch_minors_impl (on system_taskq)->spa_open_common->(wait for spa_namespace_lock)

We fix this by using dedicated taskq for vdev_file.  This same change
was originally made in commit bc25c93 but reverted in commit aa9af22
when dynamic taskqs were added.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Chunwei Chen <tuxoko@gmail.com>
Closes #5506
Closes #5495
include/sys/vdev_file.h
module/zfs/spa_misc.c
module/zfs/vdev_file.c