aboutsummaryrefslogtreecommitdiff
path: root/cddl
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2013-08-07 22:21:00 +0000
committerXin LI <delphij@FreeBSD.org>2013-08-07 22:21:00 +0000
commit9d2f243aa66dc21dcd57413ba953f128dfa3dc91 (patch)
treeee95b906e7df460ed77b3139a189f46c2b458236 /cddl
parentcc80eae5cfce35df0eb40dd2aa1f1723436dcfc4 (diff)
parent8b475cc7e41eb1c4b542a5b2e7e7f328637ac59c (diff)
downloadsrc-9d2f243aa66dc21dcd57413ba953f128dfa3dc91.tar.gz
src-9d2f243aa66dc21dcd57413ba953f128dfa3dc91.zip
MFV r254071:
Fix a regression introduced by fix for Illumos bug #3834. Quote from Matthew Ahrens on the Illumos issue: ztest fails this assertion because ztest_dmu_read_write() does dmu_tx_hold_free(tx, bigobj, bigoff, bigsize); and then dmu_object_set_checksum(os, bigobj, (enum zio_checksum)ztest_random_dsl_prop(ZFS_PROP_CHECKSUM), tx); If the region to free is past the end of the file, the DMU assumes that there will be nothing to do for this object. However, ztest does set_checksum(), which must modify the dnode. The fix is for ztest to also call dmu_tx_hold_bonus(tx, bigobj); so we can account for the dirty data associated with setting the checksum Illumos ZFS issues: 3955 ztest failure: assertion refcount_count(&tx->tx_space_written) + delta <= tx->tx_space_towrite
Notes
Notes: svn path=/head/; revision=254077
Diffstat (limited to 'cddl')
-rw-r--r--cddl/contrib/opensolaris/cmd/ztest/ztest.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/cddl/contrib/opensolaris/cmd/ztest/ztest.c b/cddl/contrib/opensolaris/cmd/ztest/ztest.c
index 1458dbc64632..74e63aa770b6 100644
--- a/cddl/contrib/opensolaris/cmd/ztest/ztest.c
+++ b/cddl/contrib/opensolaris/cmd/ztest/ztest.c
@@ -3607,6 +3607,9 @@ ztest_dmu_read_write(ztest_ds_t *zd, uint64_t id)
else
dmu_tx_hold_write(tx, bigobj, bigoff, bigsize);
+ /* This accounts for setting the checksum/compression. */
+ dmu_tx_hold_bonus(tx, bigobj);
+
txg = ztest_tx_assign(tx, TXG_MIGHTWAIT, FTAG);
if (txg == 0) {
umem_free(packbuf, packsize);