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
This commit is contained in:
Chunwei Chen
2016-12-21 10:47:15 -08:00
committed by Brian Behlendorf
parent 5f1346c299
commit da8f51e16a
3 changed files with 24 additions and 2 deletions
+2
View File
@@ -1839,6 +1839,7 @@ spa_init(int mode)
zil_init();
vdev_cache_stat_init();
vdev_raidz_math_init();
vdev_file_init();
zfs_prop_init();
zpool_prop_init();
zpool_feature_init();
@@ -1853,6 +1854,7 @@ spa_fini(void)
spa_evict_all();
vdev_file_fini();
vdev_cache_stat_fini();
vdev_raidz_math_fini();
zil_fini();