diff options
author | Matthew Macy <[email protected]> | 2019-10-28 09:51:53 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2019-10-28 09:51:53 -0700 |
commit | 4a22ba5be0aab1480aeac4581025ce6d7ce4b4a1 (patch) | |
tree | c31657ff44848b81ffd57f292362dfde3e93e11a /module/zfs/spa.c | |
parent | 7125a109dcc55628336ff3f58e59e503f4d7694d (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/zfs/spa.c')
-rw-r--r-- | module/zfs/spa.c | 6 |
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); } |