svn commit: r284030 - vendor-sys/illumos/dist/uts/common/fs/zfs vendor-sys/illumos/dist/uts/common/fs/zfs/sys vendor/illumos/dist/cmd/ztest

Andriy Gapon avg at FreeBSD.org
Fri Jun 5 16:49:24 UTC 2015


Author: avg
Date: Fri Jun  5 16:49:21 2015
New Revision: 284030
URL: https://svnweb.freebsd.org/changeset/base/284030

Log:
  5818 zfs {ref}compressratio is incorrect with 4k sector size
  
  Author: Matthew Ahrens <mahrens at delphix.com>
  Reviewed by: George Wilson <george at delphix.com>
  Reviewed by: Richard Elling <richard.elling at richardelling.com>
  Reviewed by: Steven Hartland <killing at multiplay.co.uk>
  Reviewed by: Don Brady <dev.fs.zfs at gmail.com>
  Approved by: Albert Lee <trisk at omniti.com>
  
  illumos/illumos-gate at 81cd5c555f505484180a62ca5a2fbb00d70c57d6

Modified:
  vendor/illumos/dist/cmd/ztest/ztest.c

Changes in other areas also in this revision:
Modified:
  vendor-sys/illumos/dist/uts/common/fs/zfs/spa.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/spa_misc.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/sys/spa_impl.h
  vendor-sys/illumos/dist/uts/common/fs/zfs/sys/vdev_impl.h
  vendor-sys/illumos/dist/uts/common/fs/zfs/vdev.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/zio.c

Modified: vendor/illumos/dist/cmd/ztest/ztest.c
==============================================================================
--- vendor/illumos/dist/cmd/ztest/ztest.c	Fri Jun  5 16:21:43 2015	(r284029)
+++ vendor/illumos/dist/cmd/ztest/ztest.c	Fri Jun  5 16:49:21 2015	(r284030)
@@ -20,7 +20,7 @@
  */
 /*
  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2011, 2014 by Delphix. All rights reserved.
+ * Copyright (c) 2011, 2015 by Delphix. All rights reserved.
  * Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
  * Copyright (c) 2013 Steven Hartland. All rights reserved.
  */
@@ -967,21 +967,6 @@ ztest_random_spa_version(uint64_t initia
 	return (version);
 }
 
-/*
- * Find the largest ashift used
- */
-static uint64_t
-ztest_spa_get_ashift() {
-	uint64_t i;
-	uint64_t ashift = SPA_MINBLOCKSHIFT;
-	vdev_t *rvd = ztest_spa->spa_root_vdev;
-
-	for (i = 0; i < rvd->vdev_children; i++) {
-		ashift = MAX(ashift, rvd->vdev_child[i]->vdev_ashift);
-	}
-	return (ashift);
-}
-
 static int
 ztest_random_blocksize(void)
 {
@@ -993,7 +978,7 @@ ztest_random_blocksize(void)
 	int maxbs = SPA_OLD_MAXBLOCKSHIFT;
 	if (spa_maxblocksize(ztest_spa) == SPA_MAXBLOCKSIZE)
 		maxbs = 20;
-	block_shift = ztest_random(maxbs - ztest_spa_get_ashift() + 1);
+	block_shift = ztest_random(maxbs - ztest_spa->spa_max_ashift + 1);
 	return (1 << (SPA_MINBLOCKSHIFT + block_shift));
 }
 


More information about the svn-src-all mailing list