From b6a3e408bb49c4347fd59202678375a7e7730e65 Mon Sep 17 00:00:00 2001 From: avg Date: Wed, 1 Jul 2015 10:47:13 +0000 Subject: 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. --- cddl/contrib/opensolaris/cmd/ztest/ztest.c | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) (limited to 'cddl') 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 . 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)); } -- cgit v1.1