summaryrefslogtreecommitdiffstats
path: root/cddl
diff options
context:
space:
mode:
authoravg <avg@FreeBSD.org>2015-07-01 10:47:13 +0000
committeravg <avg@FreeBSD.org>2015-07-01 10:47:13 +0000
commitb6a3e408bb49c4347fd59202678375a7e7730e65 (patch)
treeba85789b94682037686a776fe489cb5e11ce9efc /cddl
parent97017b18a63ca635334ed8db24ccb1f5ccc477c4 (diff)
downloadFreeBSD-src-b6a3e408bb49c4347fd59202678375a7e7730e65.zip
FreeBSD-src-b6a3e408bb49c4347fd59202678375a7e7730e65.tar.gz
MFC r284304: MFV r284030: 5818 zfs {ref}compressratio is incorrect with 4k sector size
Note: no MFC to stable/9 because r268075 (vendor r267565) has not been MFC-ed.
Diffstat (limited to 'cddl')
-rw-r--r--cddl/contrib/opensolaris/cmd/ztest/ztest.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/cddl/contrib/opensolaris/cmd/ztest/ztest.c b/cddl/contrib/opensolaris/cmd/ztest/ztest.c
index ab69154..0695834 100644
--- a/cddl/contrib/opensolaris/cmd/ztest/ztest.c
+++ b/cddl/contrib/opensolaris/cmd/ztest/ztest.c
@@ -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) 2012 Martin Matuska <mm@FreeBSD.org>. All rights reserved.
* Copyright (c) 2013 Steven Hartland. All rights reserved.
@@ -969,21 +969,6 @@ ztest_random_spa_version(uint64_t initial_version)
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)
{
@@ -995,7 +980,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));
}
OpenPOWER on IntegriCloud