From: Brian Behlendorf Date: Thu, 15 Jan 2009 22:16:03 +0000 (-0800) Subject: Resolve conflict with removed cleaner type X-Git-Tag: zfs-0.4.4~12^2~84^2~1^2^2~4^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a42707fcc0b4dc9c8ca654aabf2c36d5c13bceaa;p=zfs Resolve conflict with removed cleaner type --- a42707fcc0b4dc9c8ca654aabf2c36d5c13bceaa diff --cc cmd/ztest/ztest.c index a9873ab19,4503a3d02..736e175f1 --- a/cmd/ztest/ztest.c +++ b/cmd/ztest/ztest.c @@@ -1035,11 -1035,11 +1035,11 @@@ ztest_vdev_attach_detach(ztest_args_t * */ 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; } @@@ -1278,9 -1277,8 +1277,8 @@@ ztest_dmu_objset_create_destroy(ztest_a 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); @@@ -2059,9 -2056,7 +2056,7 @@@ ztest_dmu_write_parallel(ztest_args_t * 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; @@@ -2069,13 -2064,10 +2064,10 @@@ 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; @@@ -3140,9 -3159,8 +3159,8 @@@ ztest_run(char *pool 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); @@@ -3161,12 -3179,11 +3179,11 @@@ 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); } @@@ -3210,7 -3227,8 +3227,8 @@@ /* 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;