X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=options.c;h=3da376e042aedd333bd8e7605c55b3795ae1d392;hp=1c44f426dcbde350f6bff5479e31aeee37b7702f;hb=d94722713ebd7bbdbf8b284b7563f2dd17964e24;hpb=954cd73a9a93102c24afa869fbe67ac38af6e416;ds=sidebyside diff --git a/options.c b/options.c index 1c44f426..3da376e0 100644 --- a/options.c +++ b/options.c @@ -377,23 +377,6 @@ static int str_rwmix_write_cb(void *data, unsigned long long *val) return 0; } -static int str_perc_rand_cb(void *data, unsigned long long *val) -{ - struct thread_data *td = data; - - td->o.perc_rand = *val; - return 0; -} - -static int str_perc_seq_cb(void *data, unsigned long long *val) -{ - struct thread_data *td = data; - - td->o.perc_rand = 100 - *val; - return 0; -} - - static int str_exitall_cb(void) { exitall_on_terminate = 1; @@ -1669,10 +1652,12 @@ struct fio_option fio_options[FIO_MAX_OPTS] = { .name = "percentage_random", .lname = "Percentage Random", .type = FIO_OPT_INT, - .cb = str_perc_rand_cb, + .off1 = td_var_offset(perc_rand[DDIR_READ]), + .off2 = td_var_offset(perc_rand[DDIR_WRITE]), + .off3 = td_var_offset(perc_rand[DDIR_TRIM]), .maxval = 100, .help = "Percentage of seq/random mix that should be random", - .def = "100", + .def = "100,100,100", .interval = 5, .inverse = "percentage_sequential", .category = FIO_OPT_C_IO, @@ -1681,13 +1666,7 @@ struct fio_option fio_options[FIO_MAX_OPTS] = { { .name = "percentage_sequential", .lname = "Percentage Sequential", - .type = FIO_OPT_INT, - .cb = str_perc_seq_cb, - .maxval = 100, - .help = "Percentage of seq/random mix that should be sequential", - .def = "0", - .interval = 5, - .inverse = "percentage_random", + .type = FIO_OPT_DEPRECATED, .category = FIO_OPT_C_IO, .group = FIO_OPT_G_RANDOM, },