X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=options.c;h=58395051aa6ce23bb4c553031f7f18d4604f8354;hb=c70c7f58ec7404f04a385bae6a2691bd94cdd7bb;hp=4b464028c337b95bb64aa08f093e49b2f455bb45;hpb=a871240086ca6bdc52f79d7459ed283c5a359299;p=fio.git diff --git a/options.c b/options.c index 4b464028..58395051 100644 --- a/options.c +++ b/options.c @@ -1284,6 +1284,23 @@ int set_name_idx(char *target, size_t tlen, char *input, int index, return len; } +char* get_name_by_idx(char *input, int index) +{ + unsigned int cur_idx; + char *fname, *str, *p; + + p = str = strdup(input); + + index %= get_max_name_idx(input); + for (cur_idx = 0; cur_idx <= index; cur_idx++) + fname = get_next_name(&str); + + fname = strdup(fname); + free(p); + + return fname; +} + static int str_filename_cb(void *data, const char *input) { struct thread_data *td = cb_data_to_td(data); @@ -3134,6 +3151,17 @@ struct fio_option fio_options[FIO_MAX_OPTS] = { .category = FIO_OPT_C_IO, .group = FIO_OPT_G_IOLOG, }, + { + .name = "read_iolog_chunked", + .lname = "Read I/O log in parts", + .type = FIO_OPT_BOOL, + .off1 = offsetof(struct thread_options, read_iolog_chunked), + .def = "0", + .parent = "read_iolog", + .help = "Parse IO pattern in chunks", + .category = FIO_OPT_C_IO, + .group = FIO_OPT_G_IOLOG, + }, { .name = "replay_no_stall", .lname = "Don't stall on replay",