*/
if (oldvd_has_siblings && ztest_random(2) == 0) {
spa_config_exit(spa, SCL_VDEV, FTAG);
- error = spa_vdev_detach(spa, oldguid, B_FALSE);
- if (error != 0 && error != ENODEV && error != EBUSY)
- fatal(0, "detach (%s) returned %d",
- oldpath, error);
+ error = spa_vdev_detach(spa, oldguid, pguid, B_FALSE);
+ if (error != 0 && error != ENODEV && error != EBUSY &&
+ error != ENOTSUP)
+ fatal(0, "detach (%s) returned %d", oldpath, error);
- (void) mutex_unlock(&ztest_shared->zs_vdev_lock);
+ (void) pthread_mutex_unlock(&ztest_shared->zs_vdev_lock);
return;
}
zilog_t *zilog;
uint64_t seq;
uint64_t objects;
- ztest_replay_t zr;
- (void) rw_rdlock(&ztest_shared->zs_name_lock);
+ (void) pthread_rwlock_rdlock(&ztest_shared->zs_name_lock);
(void) snprintf(name, 100, "%s/%s_temp_%llu", za->za_pool, za->za_pool,
(u_longlong_t)za->za_instance);
error = dmu_buf_hold(os, ZTEST_DIROBJ, blkoff, FTAG, &db);
za->za_dbuf = db;
if (error) {
- dprintf("dmu_buf_hold(%s, %d, %llx) = %d\n",
- osname, ZTEST_DIROBJ, blkoff, error);
- (void) mutex_unlock(lp);
+ (void) pthread_mutex_unlock(lp);
return;
}
blkoff = off - blkoff;
dmu_buf_rele(db, FTAG);
za->za_dbuf = NULL;
- (void) mutex_unlock(lp);
+ (void) pthread_mutex_unlock(lp);
- if (error) {
- dprintf("dmu_sync(%s, %d, %llx) = %d\n",
- osname, ZTEST_DIROBJ, off, error);
+ if (error)
return;
- }
if (blk.blk_birth == 0) /* concurrent free */
return;
za[t].za_kill = za[0].za_kill;
if (t < zopt_datasets) {
- ztest_replay_t zr;
int test_future = FALSE;
- (void) rw_rdlock(&ztest_shared->zs_name_lock);
+ (void) pthread_rwlock_rdlock(&ztest_shared->zs_name_lock);
(void) snprintf(name, 100, "%s/%s_%d", pool, pool, d);
error = dmu_objset_create(name, DMU_OST_OTHER, NULL, 0,
ztest_create_cb, NULL);
if (error)
fatal(0, "dmu_objset_open('%s') = %d",
name, error);
- (void) rw_unlock(&ztest_shared->zs_name_lock);
+ (void) pthread_rwlock_unlock(&ztest_shared->zs_name_lock);
if (test_future)
ztest_dmu_check_future_leak(&za[t]);
- zr.zr_os = za[d].za_os;
- zil_replay(zr.zr_os, &zr, &zr.zr_assign,
- ztest_replay_vector, NULL);
+ zil_replay(za[d].za_os, za[d].za_os,
+ ztest_replay_vector);
za[d].za_zilog = zil_open(za[d].za_os, NULL);
}
/* Kill the resume thread */
ztest_exiting = B_TRUE;
- VERIFY(thr_join(resume_tid, NULL, NULL) == 0);
+ VERIFY(pthread_join(resume_tid, NULL) == 0);
+ ztest_resume(spa);
/*
* Right before closing the pool, kick off a bunch of async I/O;