summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorMatthew Macy <[email protected]>2019-10-28 09:51:53 -0700
committerBrian Behlendorf <[email protected]>2019-10-28 09:51:53 -0700
commit4a22ba5be0aab1480aeac4581025ce6d7ce4b4a1 (patch)
treec31657ff44848b81ffd57f292362dfde3e93e11a /module
parent7125a109dcc55628336ff3f58e59e503f4d7694d (diff)
Minor spa portability fixes
- FreeBSD's rootpool import code uses spa_config_parse - Move the zvol_create_minors call out from under the spa_namespace_lock in spa_import. It isn't needed and it causes a lock order reversal on FreeBSD. Reviewed-by: Igor Kozhukhov <[email protected]> Reviewed-by: Jorgen Lundman <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Matt Macy <[email protected]> Closes #9499
Diffstat (limited to 'module')
-rw-r--r--module/zfs/spa.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/module/zfs/spa.c b/module/zfs/spa.c
index facd5eda8..9bfd24d98 100644
--- a/module/zfs/spa.c
+++ b/module/zfs/spa.c
@@ -1406,7 +1406,7 @@ spa_deactivate(spa_t *spa)
* in the CLOSED state. This will prep the pool before open/creation/import.
* All vdev validation is done by the vdev_alloc() routine.
*/
-static int
+int
spa_config_parse(spa_t *spa, vdev_t **vdp, nvlist_t *nv, vdev_t *parent,
uint_t id, int atype)
{
@@ -6081,10 +6081,10 @@ spa_import(char *pool, nvlist_t *config, nvlist_t *props, uint64_t flags)
spa_event_notify(spa, NULL, NULL, ESC_ZFS_POOL_IMPORT);
- zvol_create_minors(spa, pool, B_TRUE);
-
mutex_exit(&spa_namespace_lock);
+ zvol_create_minors(spa, pool, B_TRUE);
+
return (0);
}