diff options
author | Matt Ahrens <Matt.Ahrens@delphix.com> | 2017-07-24 11:07:39 -0700 |
---|---|---|
committer | Prakash Surya <prakash.surya@delphix.com> | 2018-03-21 08:26:16 -0700 |
commit | 243952c7eeef020886e3e2e3df99a513df40584a (patch) | |
tree | 0f04ab46e0646db421e3c1a583c14630371e9013 | |
parent | 0a052a62e5b55bf138983a4b3ef88eb752006ae4 (diff) | |
download | illumos-joyent-243952c7eeef020886e3e2e3df99a513df40584a.tar.gz |
9280 Assertion failure while running removal_with_ganging test with 4K devices
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: John Kennedy <john.kennedy@delphix.com>
Approved by: Garrett D'Amore <garrett@damore.org>
-rw-r--r-- | usr/src/cmd/mdb/common/modules/zfs/zfs.c | 2 | ||||
-rw-r--r-- | usr/src/cmd/ztest/ztest.c | 20 | ||||
-rw-r--r-- | usr/src/lib/libzpool/common/llib-lzpool | 4 | ||||
-rw-r--r-- | usr/src/test/zfs-tests/tests/functional/removal/removal_with_ganging.ksh | 10 | ||||
-rw-r--r-- | usr/src/uts/common/fs/zfs/metaslab.c | 4 |
5 files changed, 20 insertions, 20 deletions
diff --git a/usr/src/cmd/mdb/common/modules/zfs/zfs.c b/usr/src/cmd/mdb/common/modules/zfs/zfs.c index 0c99391147..06ce396ef8 100644 --- a/usr/src/cmd/mdb/common/modules/zfs/zfs.c +++ b/usr/src/cmd/mdb/common/modules/zfs/zfs.c @@ -396,7 +396,7 @@ zfs_params(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv) "zfs_read_chunk_size", "zfs_nocacheflush", "zil_replay_disable", - "metaslab_gang_bang", + "metaslab_force_ganging", "metaslab_df_alloc_threshold", "metaslab_df_free_pct", "zio_injection_enabled", diff --git a/usr/src/cmd/ztest/ztest.c b/usr/src/cmd/ztest/ztest.c index b53d4a091a..1522c75485 100644 --- a/usr/src/cmd/ztest/ztest.c +++ b/usr/src/cmd/ztest/ztest.c @@ -162,7 +162,7 @@ typedef struct ztest_shared_opts { int zo_init; uint64_t zo_time; uint64_t zo_maxloops; - uint64_t zo_metaslab_gang_bang; + uint64_t zo_metaslab_force_ganging; } ztest_shared_opts_t; static const ztest_shared_opts_t ztest_opts_defaults = { @@ -184,10 +184,10 @@ static const ztest_shared_opts_t ztest_opts_defaults = { .zo_init = 1, .zo_time = 300, /* 5 minutes */ .zo_maxloops = 50, /* max loops during spa_freeze() */ - .zo_metaslab_gang_bang = 32 << 10 + .zo_metaslab_force_ganging = 32 << 10 }; -extern uint64_t metaslab_gang_bang; +extern uint64_t metaslab_force_ganging; extern uint64_t metaslab_df_alloc_threshold; extern uint64_t zfs_deadman_synctime_ms; extern int metaslab_preload_limit; @@ -565,12 +565,12 @@ usage(boolean_t requested) const ztest_shared_opts_t *zo = &ztest_opts_defaults; char nice_vdev_size[NN_NUMBUF_SZ]; - char nice_gang_bang[NN_NUMBUF_SZ]; + char nice_force_ganging[NN_NUMBUF_SZ]; FILE *fp = requested ? stdout : stderr; nicenum(zo->zo_vdev_size, nice_vdev_size, sizeof (nice_vdev_size)); - nicenum(zo->zo_metaslab_gang_bang, nice_gang_bang, - sizeof (nice_gang_bang)); + nicenum(zo->zo_metaslab_force_ganging, nice_force_ganging, + sizeof (nice_force_ganging)); (void) fprintf(fp, "Usage: %s\n" "\t[-v vdevs (default: %llu)]\n" @@ -605,7 +605,7 @@ usage(boolean_t requested) zo->zo_raidz_parity, /* -R */ zo->zo_datasets, /* -d */ zo->zo_threads, /* -t */ - nice_gang_bang, /* -g */ + nice_force_ganging, /* -g */ zo->zo_init, /* -i */ (u_longlong_t)zo->zo_killrate, /* -k */ zo->zo_pool, /* -p */ @@ -674,8 +674,8 @@ process_options(int argc, char **argv) zo->zo_threads = MAX(1, value); break; case 'g': - zo->zo_metaslab_gang_bang = MAX(SPA_MINBLOCKSIZE << 1, - value); + zo->zo_metaslab_force_ganging = + MAX(SPA_MINBLOCKSIZE << 1, value); break; case 'i': zo->zo_init = value; @@ -6422,7 +6422,7 @@ main(int argc, char **argv) zs = ztest_shared; if (fd_data_str) { - metaslab_gang_bang = ztest_opts.zo_metaslab_gang_bang; + metaslab_force_ganging = ztest_opts.zo_metaslab_force_ganging; metaslab_df_alloc_threshold = zs->zs_metaslab_df_alloc_threshold; diff --git a/usr/src/lib/libzpool/common/llib-lzpool b/usr/src/lib/libzpool/common/llib-lzpool index 27d01fd54d..871facace3 100644 --- a/usr/src/lib/libzpool/common/llib-lzpool +++ b/usr/src/lib/libzpool/common/llib-lzpool @@ -24,7 +24,7 @@ */ /* - * Copyright (c) 2012, 2015 by Delphix. All rights reserved. + * Copyright (c) 2012, 2017 by Delphix. All rights reserved. */ /* LINTLIBRARY */ @@ -64,7 +64,7 @@ #include <sys/abd.h> #include <libcmdutils.h> -extern uint64_t metaslab_gang_bang; +extern uint64_t metaslab_force_ganging; extern uint64_t metaslab_df_alloc_threshold; extern boolean_t zfeature_checks_disable; extern uint64_t zfs_deadman_synctime_ms; diff --git a/usr/src/test/zfs-tests/tests/functional/removal/removal_with_ganging.ksh b/usr/src/test/zfs-tests/tests/functional/removal/removal_with_ganging.ksh index 53251592ff..bfcb0151ca 100644 --- a/usr/src/test/zfs-tests/tests/functional/removal/removal_with_ganging.ksh +++ b/usr/src/test/zfs-tests/tests/functional/removal/removal_with_ganging.ksh @@ -15,26 +15,26 @@ # # -# Copyright (c) 2014, 2016 by Delphix. All rights reserved. +# Copyright (c) 2014, 2017 by Delphix. All rights reserved. # . $STF_SUITE/include/libtest.shlib . $STF_SUITE/tests/functional/removal/removal.kshlib -function set_metaslab_gang_bang # new_value +function set_metaslab_force_ganging # new_value { typeset new_value=$1 - echo "metaslab_gang_bang/W $new_value" | mdb -kw + echo "metaslab_force_ganging/W $new_value" | mdb -kw } function cleanup { - log_must set_metaslab_gang_bang 0t$((2**17 + 1)) + log_must set_metaslab_force_ganging 0t$((2**17 + 1)) default_cleanup_noexit } default_setup_noexit "$DISKS" -log_must set_metaslab_gang_bang 0t$((2**12)) +log_must set_metaslab_force_ganging 0t$((2**14)) log_onexit cleanup FILE_CONTENTS="Leeloo Dallas mul-ti-pass." diff --git a/usr/src/uts/common/fs/zfs/metaslab.c b/usr/src/uts/common/fs/zfs/metaslab.c index 54c4394ffc..25f5cc9649 100644 --- a/usr/src/uts/common/fs/zfs/metaslab.c +++ b/usr/src/uts/common/fs/zfs/metaslab.c @@ -41,7 +41,7 @@ ((flags) & (METASLAB_GANG_CHILD | METASLAB_GANG_HEADER)) uint64_t metaslab_aliquot = 512ULL << 10; -uint64_t metaslab_gang_bang = SPA_MAXBLOCKSIZE + 1; /* force gang blocks */ +uint64_t metaslab_force_ganging = SPA_MAXBLOCKSIZE + 1; /* force gang blocks */ /* * Since we can touch multiple metaslabs (and their respective space maps) @@ -3080,7 +3080,7 @@ metaslab_alloc_dva(spa_t *spa, metaslab_class_t *mc, uint64_t psize, /* * For testing, make some blocks above a certain size be gang blocks. */ - if (psize >= metaslab_gang_bang && (ddi_get_lbolt() & 3) == 0) { + if (psize >= metaslab_force_ganging && (ddi_get_lbolt() & 3) == 0) { metaslab_trace_add(zal, NULL, NULL, psize, d, TRACE_FORCE_GANG); return (SET_ERROR(ENOSPC)); } |