Print this page
3955 ztest failure: assertion refcount_count(&tx->tx_space_written) + delta <= tx->tx_space_towrite
Reviewed by: Adam Leventhal <ahl@delphix.com>
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>


3588          */
3589         error = dmu_read(os, packobj, packoff, packsize, packbuf,
3590             DMU_READ_PREFETCH);
3591         ASSERT0(error);
3592         error = dmu_read(os, bigobj, bigoff, bigsize, bigbuf,
3593             DMU_READ_PREFETCH);
3594         ASSERT0(error);
3595 
3596         /*
3597          * Get a tx for the mods to both packobj and bigobj.
3598          */
3599         tx = dmu_tx_create(os);
3600 
3601         dmu_tx_hold_write(tx, packobj, packoff, packsize);
3602 
3603         if (freeit)
3604                 dmu_tx_hold_free(tx, bigobj, bigoff, bigsize);
3605         else
3606                 dmu_tx_hold_write(tx, bigobj, bigoff, bigsize);
3607 



3608         txg = ztest_tx_assign(tx, TXG_MIGHTWAIT, FTAG);
3609         if (txg == 0) {
3610                 umem_free(packbuf, packsize);
3611                 umem_free(bigbuf, bigsize);
3612                 return;
3613         }
3614 
3615         dmu_object_set_checksum(os, bigobj,
3616             (enum zio_checksum)ztest_random_dsl_prop(ZFS_PROP_CHECKSUM), tx);
3617 
3618         dmu_object_set_compress(os, bigobj,
3619             (enum zio_compress)ztest_random_dsl_prop(ZFS_PROP_COMPRESSION), tx);
3620 
3621         /*
3622          * For each index from n to n + s, verify that the existing bufwad
3623          * in packobj matches the bufwads at the head and tail of the
3624          * corresponding chunk in bigobj.  Then update all three bufwads
3625          * with the new values we want to write out.
3626          */
3627         for (i = 0; i < s; i++) {




3588          */
3589         error = dmu_read(os, packobj, packoff, packsize, packbuf,
3590             DMU_READ_PREFETCH);
3591         ASSERT0(error);
3592         error = dmu_read(os, bigobj, bigoff, bigsize, bigbuf,
3593             DMU_READ_PREFETCH);
3594         ASSERT0(error);
3595 
3596         /*
3597          * Get a tx for the mods to both packobj and bigobj.
3598          */
3599         tx = dmu_tx_create(os);
3600 
3601         dmu_tx_hold_write(tx, packobj, packoff, packsize);
3602 
3603         if (freeit)
3604                 dmu_tx_hold_free(tx, bigobj, bigoff, bigsize);
3605         else
3606                 dmu_tx_hold_write(tx, bigobj, bigoff, bigsize);
3607 
3608         /* This accounts for setting the checksum/compression. */
3609         dmu_tx_hold_bonus(tx, bigobj);
3610 
3611         txg = ztest_tx_assign(tx, TXG_MIGHTWAIT, FTAG);
3612         if (txg == 0) {
3613                 umem_free(packbuf, packsize);
3614                 umem_free(bigbuf, bigsize);
3615                 return;
3616         }
3617 
3618         dmu_object_set_checksum(os, bigobj,
3619             (enum zio_checksum)ztest_random_dsl_prop(ZFS_PROP_CHECKSUM), tx);
3620 
3621         dmu_object_set_compress(os, bigobj,
3622             (enum zio_compress)ztest_random_dsl_prop(ZFS_PROP_COMPRESSION), tx);
3623 
3624         /*
3625          * For each index from n to n + s, verify that the existing bufwad
3626          * in packobj matches the bufwads at the head and tail of the
3627          * corresponding chunk in bigobj.  Then update all three bufwads
3628          * with the new values we want to write out.
3629          */
3630         for (i = 0; i < s; i++) {