MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ztest_import_impl

Function ztest_import_impl

freebsd/contrib/openzfs/cmd/ztest/ztest.c:7142–7160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7140}
7141
7142static void
7143ztest_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.

Callers 2

ztest_importFunction · 0.85
ztest_runFunction · 0.85

Calls 3

zpool_find_configFunction · 0.85
spa_importFunction · 0.85
fnvlist_freeFunction · 0.85

Tested by

no test coverage detected