Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Feb 2014 16:41:58 +0000 (UTC)
From:      Andriy Gapon <avg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r262085 - in stable/8: cddl/contrib/opensolaris/cmd/ztest sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Message-ID:  <201402171641.s1HGfwB7043090@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: avg
Date: Mon Feb 17 16:41:58 2014
New Revision: 262085
URL: http://svnweb.freebsd.org/changeset/base/262085

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

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

Modified: stable/8/cddl/contrib/opensolaris/cmd/ztest/ztest.c
==============================================================================
--- stable/8/cddl/contrib/opensolaris/cmd/ztest/ztest.c	Mon Feb 17 16:41:45 2014	(r262084)
+++ stable/8/cddl/contrib/opensolaris/cmd/ztest/ztest.c	Mon Feb 17 16:41:58 2014	(r262085)
@@ -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/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c
==============================================================================
--- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c	Mon Feb 17 16:41:45 2014	(r262084)
+++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c	Mon Feb 17 16:41:58 2014	(r262085)
@@ -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 */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201402171641.s1HGfwB7043090>