Skip to content

Commit

Permalink
7147 ztest: ztest_ddt_repair fails with ztest_pattern_match assertion
Browse files Browse the repository at this point in the history
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
  • Loading branch information
grwilson authored and ahrens committed Jul 19, 2016
1 parent d88e84f commit aab8072
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions usr/src/cmd/ztest/ztest.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*/
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2015 by Delphix. All rights reserved.
* Copyright (c) 2011, 2016 by Delphix. All rights reserved.
* Copyright 2011 Nexenta Systems, Inc. All rights reserved.
* Copyright (c) 2013 Steven Hartland. All rights reserved.
* Copyright (c) 2014 Integros [integros.com]
Expand Down Expand Up @@ -5046,9 +5046,14 @@ ztest_ddt_repair(ztest_ds_t *zd, uint64_t id)
return;
}

dmu_objset_stats_t dds;
dsl_pool_config_enter(dmu_objset_pool(os), FTAG);
dmu_objset_fast_stat(os, &dds);
dsl_pool_config_exit(dmu_objset_pool(os), FTAG);

object = od[0].od_object;
blocksize = od[0].od_blocksize;
pattern = zs->zs_guid ^ dmu_objset_fsid_guid(os);
pattern = zs->zs_guid ^ dds.dds_guid;

ASSERT(object != 0);

Expand Down Expand Up @@ -5650,9 +5655,13 @@ ztest_run(ztest_shared_t *zs)
metaslab_preload_limit = ztest_random(20) + 1;
ztest_spa = spa;

dmu_objset_stats_t dds;
VERIFY0(dmu_objset_own(ztest_opts.zo_pool,
DMU_OST_ANY, B_TRUE, FTAG, &os));
zs->zs_guid = dmu_objset_fsid_guid(os);
dsl_pool_config_enter(dmu_objset_pool(os), FTAG);
dmu_objset_fast_stat(os, &dds);
dsl_pool_config_exit(dmu_objset_pool(os), FTAG);
zs->zs_guid = dds.dds_guid;
dmu_objset_disown(os, FTAG);

spa->spa_dedup_ditto = 2 * ZIO_DEDUPDITTO_MIN;
Expand Down

0 comments on commit aab8072

Please sign in to comment.