4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright (C) 2016 Gvozden Nešković. All rights reserved.
31 static const char *raidz_impl_names
[] = {
45 typedef struct raidz_test_opts
{
52 size_t rto_sweep_timeout
;
55 uint64_t rto_expand_offset
;
59 /* non-user options */
60 boolean_t rto_should_stop
;
63 raidz_map_t
*rm_golden
;
66 static const raidz_test_opts_t rto_opts_defaults
= {
68 .rto_offset
= 1ULL << 0,
75 .rto_expand_offset
= -1ULL,
78 .rto_should_stop
= B_FALSE
81 extern raidz_test_opts_t rto_opts
;
83 static inline size_t ilog2(size_t a
)
85 return (a
> 1 ? 1 + ilog2(a
>> 1) : 0);
93 #define LOG(lvl, a...) \
95 if (rto_opts.rto_v >= lvl) \
96 (void) fprintf(stdout, a); \
99 #define LOG_OPT(lvl, opt, a...) \
101 if (opt->rto_v >= lvl) \
102 (void) fprintf(stdout, a); \
105 #define ERR(a...) (void) fprintf(stderr, a)
108 #define DBLSEP "================\n"
109 #define SEP "----------------\n"
112 #define raidz_alloc(size) abd_alloc(size, B_FALSE)
113 #define raidz_free(p, size) abd_free(p)
116 void init_zio_abd(zio_t
*zio
);
118 void run_raidz_benchmark(void);
120 struct raidz_map
*vdev_raidz_map_alloc_expanded(abd_t
*, uint64_t, uint64_t,
121 uint64_t, uint64_t, uint64_t, uint64_t, uint64_t);
123 #endif /* RAIDZ_TEST_H */