| 7140 | } |
| 7141 | |
| 7142 | static void |
| 7143 | ztest_import_impl(ztest_shared_t *zs) |
| 7144 | { |
| 7145 | importargs_t args = { 0 }; |
| 7146 | nvlist_t *cfg = NULL; |
| 7147 | int nsearch = 1; |
| 7148 | char *searchdirs[nsearch]; |
| 7149 | int flags = ZFS_IMPORT_MISSING_LOG; |
| 7150 | |
| 7151 | searchdirs[0] = ztest_opts.zo_dir; |
| 7152 | args.paths = nsearch; |
| 7153 | args.path = searchdirs; |
| 7154 | args.can_be_active = B_FALSE; |
| 7155 | |
| 7156 | VERIFY0(zpool_find_config(NULL, ztest_opts.zo_pool, &cfg, &args, |
| 7157 | &libzpool_config_ops)); |
| 7158 | VERIFY0(spa_import(ztest_opts.zo_pool, cfg, NULL, flags)); |
| 7159 | fnvlist_free(cfg); |
| 7160 | } |
| 7161 | |
| 7162 | /* |
| 7163 | * Import a storage pool with the given name. |
no test coverage detected