aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/ztest/ztest.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/ztest/ztest.c')
-rw-r--r--cmd/ztest/ztest.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/cmd/ztest/ztest.c b/cmd/ztest/ztest.c
index b886f1e99..dbc5084d0 100644
--- a/cmd/ztest/ztest.c
+++ b/cmd/ztest/ztest.c
@@ -5826,8 +5826,8 @@ ztest_fault_inject(ztest_ds_t *zd, uint64_t id)
(long long)vd0->vdev_id, (int)maxfaults);
if (vf != NULL && ztest_random(3) == 0) {
- (void) close(vf->vf_vnode->v_fd);
- vf->vf_vnode->v_fd = -1;
+ (void) close(vf->vf_file->f_fd);
+ vf->vf_file->f_fd = -1;
} else if (ztest_random(2) == 0) {
vd0->vdev_cant_read = B_TRUE;
} else {
@@ -6933,7 +6933,7 @@ ztest_run(ztest_shared_t *zs)
/*
* Open our pool.
*/
- kernel_init(FREAD | FWRITE);
+ kernel_init(SPA_MODE_READ | SPA_MODE_WRITE);
VERIFY0(spa_open(ztest_opts.zo_pool, &spa, FTAG));
metaslab_preload_limit = ztest_random(20) + 1;
ztest_spa = spa;
@@ -7122,7 +7122,7 @@ ztest_freeze(void)
if (ztest_opts.zo_verbose >= 3)
(void) printf("testing spa_freeze()...\n");
- kernel_init(FREAD | FWRITE);
+ kernel_init(SPA_MODE_READ | SPA_MODE_WRITE);
VERIFY3U(0, ==, spa_open(ztest_opts.zo_pool, &spa, FTAG));
VERIFY3U(0, ==, ztest_dataset_open(0));
ztest_spa = spa;
@@ -7189,7 +7189,7 @@ ztest_freeze(void)
/*
* Open and close the pool and dataset to induce log replay.
*/
- kernel_init(FREAD | FWRITE);
+ kernel_init(SPA_MODE_READ | SPA_MODE_WRITE);
VERIFY3U(0, ==, spa_open(ztest_opts.zo_pool, &spa, FTAG));
ASSERT(spa_freeze_txg(spa) == UINT64_MAX);
VERIFY3U(0, ==, ztest_dataset_open(0));
@@ -7262,7 +7262,7 @@ ztest_import(ztest_shared_t *zs)
mutex_init(&ztest_checkpoint_lock, NULL, MUTEX_DEFAULT, NULL);
VERIFY0(pthread_rwlock_init(&ztest_name_lock, NULL));
- kernel_init(FREAD | FWRITE);
+ kernel_init(SPA_MODE_READ | SPA_MODE_WRITE);
searchdirs[0] = ztest_opts.zo_dir;
args.paths = nsearch;
@@ -7308,7 +7308,7 @@ ztest_init(ztest_shared_t *zs)
mutex_init(&ztest_checkpoint_lock, NULL, MUTEX_DEFAULT, NULL);
VERIFY0(pthread_rwlock_init(&ztest_name_lock, NULL));
- kernel_init(FREAD | FWRITE);
+ kernel_init(SPA_MODE_READ | SPA_MODE_WRITE);
/*
* Create the storage pool.