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
+3
View File
@@ -37,6 +37,9 @@ typedef struct vdev_file {
vnode_t *vf_vnode;
} vdev_file_t;
extern void vdev_file_init(void);
extern void vdev_file_fini(void);
#ifdef __cplusplus
}
#endif