svn commit: r262084 - in stable/9: cddl/contrib/opensolaris/cmd/ztest sys/cddl/contrib/opensolaris/uts/common/fs/zfs

Andriy Gapon avg at FreeBSD.org
Mon Feb 17 16:41:46 UTC 2014


Author: avg
Date: Mon Feb 17 16:41:45 2014
New Revision: 262084
URL: http://svnweb.freebsd.org/changeset/base/262084

Log:
  MFC r254077: MFV r254071: Fix a regression introduced by fix for Illumos bug #3834

Modified:
  stable/9/cddl/contrib/opensolaris/cmd/ztest/ztest.c
  stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c
Directory Properties:
  stable/9/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)

Modified: stable/9/cddl/contrib/opensolaris/cmd/ztest/ztest.c
==============================================================================
--- stable/9/cddl/contrib/opensolaris/cmd/ztest/ztest.c	Mon Feb 17 16:33:42 2014	(r262083)
+++ stable/9/cddl/contrib/opensolaris/cmd/ztest/ztest.c	Mon Feb 17 16:41:45 2014	(r262084)
@@ -3607,6 +3607,9 @@ ztest_dmu_read_write(ztest_ds_t *zd, uin
 	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);

Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c
==============================================================================
--- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c	Mon Feb 17 16:33:42 2014	(r262083)
+++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c	Mon Feb 17 16:41:45 2014	(r262084)
@@ -449,12 +449,12 @@ dmu_tx_count_free(dmu_tx_hold_t *txh, ui
 		blkid = off >> dn->dn_datablkshift;
 		nblks = (len + dn->dn_datablksz - 1) >> dn->dn_datablkshift;
 
-		if (blkid >= dn->dn_maxblkid) {
+		if (blkid > dn->dn_maxblkid) {
 			rw_exit(&dn->dn_struct_rwlock);
 			return;
 		}
 		if (blkid + nblks > dn->dn_maxblkid)
-			nblks = dn->dn_maxblkid - blkid;
+			nblks = dn->dn_maxblkid - blkid + 1;
 
 	}
 	l0span = nblks;    /* save for later use to calc level > 1 overhead */


More information about the svn-src-stable-9 mailing list