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
[] = {
42 typedef struct raidz_test_opts
{
49 size_t rto_sweep_timeout
;
54 /* non-user options */
55 boolean_t rto_should_stop
;
58 raidz_map_t
*rm_golden
;
61 static const raidz_test_opts_t rto_opts_defaults
= {
63 .rto_offset
= 1ULL << 0,
71 .rto_should_stop
= B_FALSE
74 extern raidz_test_opts_t rto_opts
;
76 static inline size_t ilog2(size_t a
)
78 return (a
> 1 ? 1 + ilog2(a
>> 1) : 0);
86 #define LOG(lvl, a...) \
88 if (rto_opts.rto_v >= lvl) \
89 (void) fprintf(stdout, a); \
92 #define LOG_OPT(lvl, opt, a...) \
94 if (opt->rto_v >= lvl) \
95 (void) fprintf(stdout, a); \
98 #define ERR(a...) (void) fprintf(stderr, a)
101 #define DBLSEP "================\n"
102 #define SEP "----------------\n"
105 #define raidz_alloc(size) zio_data_buf_alloc(size)
106 #define raidz_free(p, size) zio_data_buf_free(p, size)
109 void init_zio_data(zio_t
*zio
);
111 void run_raidz_benchmark(void);
113 #endif /* RAIDZ_TEST_H */