diff options
Diffstat (limited to 'cmd/zpool/zpool_main.c')
-rw-r--r-- | cmd/zpool/zpool_main.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/cmd/zpool/zpool_main.c b/cmd/zpool/zpool_main.c index b74dc219a..c9b600650 100644 --- a/cmd/zpool/zpool_main.c +++ b/cmd/zpool/zpool_main.c @@ -2331,7 +2331,15 @@ zpool_do_import(int argc, char **argv) idata.cachefile = cachefile; idata.scan = do_scan; + /* + * Under Linux the zpool_find_import_impl() function leverages the + * taskq implementation to parallelize device scanning. It is + * therefore necessary to initialize this functionality for the + * duration of the zpool_search_import() function. + */ + thread_init(); pools = zpool_search_import(g_zfs, &idata); + thread_fini(); if (pools != NULL && idata.exists && (argc == 1 || strcmp(argv[0], argv[1]) == 0)) { |