raidz_test: silence unsigned >=0 warnings
Reviewed-by: Alejandro Colomar <alx.manpages@gmail.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #13110
This commit is contained in:
parent
a215c3e834
commit
b7c42ce5b2
|
@ -71,12 +71,13 @@ static void print_opts(raidz_test_opts_t *opts, boolean_t force)
|
|||
{
|
||||
char *verbose;
|
||||
switch (opts->rto_v) {
|
||||
case 0:
|
||||
case D_ALL:
|
||||
verbose = "no";
|
||||
break;
|
||||
case 1:
|
||||
case D_INFO:
|
||||
verbose = "info";
|
||||
break;
|
||||
case D_DEBUG:
|
||||
default:
|
||||
verbose = "debug";
|
||||
break;
|
||||
|
@ -119,7 +120,7 @@ static void usage(boolean_t requested)
|
|||
"\t[-B benchmark all raidz implementations]\n"
|
||||
"\t[-e use expanded raidz map (default: %s)]\n"
|
||||
"\t[-r expanded raidz map reflow offset (default: %llx)]\n"
|
||||
"\t[-v increase verbosity (default: %zu)]\n"
|
||||
"\t[-v increase verbosity (default: %d)]\n"
|
||||
"\t[-h (print help)]\n"
|
||||
"\t[-T test the test, see if failure would be detected]\n"
|
||||
"\t[-D debug (attach gdb on SIGSEGV)]\n"
|
||||
|
@ -131,7 +132,7 @@ static void usage(boolean_t requested)
|
|||
rto_opts.rto_sweep ? "yes" : "no", /* -S */
|
||||
rto_opts.rto_expand ? "yes" : "no", /* -e */
|
||||
(u_longlong_t)o->rto_expand_offset, /* -r */
|
||||
o->rto_v); /* -d */
|
||||
o->rto_v); /* -v */
|
||||
|
||||
exit(requested ? 0 : 1);
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
#include <sys/spa.h>
|
||||
|
||||
static const char *raidz_impl_names[] = {
|
||||
static const char *const raidz_impl_names[] = {
|
||||
"original",
|
||||
"scalar",
|
||||
"sse2",
|
||||
|
@ -42,12 +42,18 @@ static const char *raidz_impl_names[] = {
|
|||
NULL
|
||||
};
|
||||
|
||||
enum raidz_verbosity {
|
||||
D_ALL,
|
||||
D_INFO,
|
||||
D_DEBUG,
|
||||
};
|
||||
|
||||
typedef struct raidz_test_opts {
|
||||
size_t rto_ashift;
|
||||
uint64_t rto_offset;
|
||||
size_t rto_dcols;
|
||||
size_t rto_dsize;
|
||||
size_t rto_v;
|
||||
enum raidz_verbosity rto_v;
|
||||
size_t rto_sweep;
|
||||
size_t rto_sweep_timeout;
|
||||
size_t rto_benchmark;
|
||||
|
@ -68,7 +74,7 @@ static const raidz_test_opts_t rto_opts_defaults = {
|
|||
.rto_offset = 1ULL << 0,
|
||||
.rto_dcols = 8,
|
||||
.rto_dsize = 1<<19,
|
||||
.rto_v = 0,
|
||||
.rto_v = D_ALL,
|
||||
.rto_sweep = 0,
|
||||
.rto_benchmark = 0,
|
||||
.rto_expand = 0,
|
||||
|
@ -86,10 +92,6 @@ static inline size_t ilog2(size_t a)
|
|||
}
|
||||
|
||||
|
||||
#define D_ALL 0
|
||||
#define D_INFO 1
|
||||
#define D_DEBUG 2
|
||||
|
||||
#define LOG(lvl, a...) \
|
||||
{ \
|
||||
if (rto_opts.rto_v >= lvl) \
|
||||
|
|
Loading…
Reference in New Issue