changeset 13818:e9ad0a945d45

3189 kernel panic in ZFS test suite during hotspare_onoffline_004_neg Reviewed by: Matthew Ahrens <mahrens@delphix.com> Reviewed by: Arne Jansen <sensille@gmx.net> Approved by: Dan McDonald <danmcd@nexenta.com>
author Christopher Siden <chris.siden@delphix.com>
date Wed, 19 Sep 2012 15:53:16 -0400
parents 8e6d00a24b13
children f56bf3fb65f4
files usr/src/lib/libzfs/common/llib-lzfs usr/src/uts/common/fs/zfs/dmu_tx.c
diffstat 2 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/lib/libzfs/common/llib-lzfs	Mon Sep 17 05:34:00 2012 -0500
+++ b/usr/src/lib/libzfs/common/llib-lzfs	Wed Sep 19 15:53:16 2012 -0400
@@ -20,13 +20,13 @@
  */
 /*
  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
- * Copyright 2010 Nexenta Systems, Inc. All rights reserved.
  * Use is subject to license terms.
  */
 
- /*
-  * Copyright (c) 2012 by Delphix. All rights reserved.
-  */
+/*
+ * Copyright 2010 Nexenta Systems, Inc. All rights reserved.
+ * Copyright (c) 2012 by Delphix. All rights reserved.
+ */
 
 /*LINTLIBRARY*/
 /*PROTOLIB1*/
--- a/usr/src/uts/common/fs/zfs/dmu_tx.c	Mon Sep 17 05:34:00 2012 -0500
+++ b/usr/src/uts/common/fs/zfs/dmu_tx.c	Wed Sep 19 15:53:16 2012 -0400
@@ -572,7 +572,7 @@
 		    (dn->dn_indblkshift - SPA_BLKPTRSHIFT);
 
 		while (level++ < maxlevel) {
-			txh->txh_memory_tohold += MIN(blkcnt, (nl1blks >> epbs))
+			txh->txh_memory_tohold += MAX(MIN(blkcnt, nl1blks), 1)
 			    << dn->dn_indblkshift;
 			blkcnt = 1 + (blkcnt >> epbs);
 		}