X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=options.c;h=4a54c98c15045864931ea503d3f7920bab4ae431;hb=499b43c1dc1c07ef87c0736e65e357c93fc6e99e;hp=4ff4c9b42a7bd9af3a85251ac2b5a40f20b185d9;hpb=50b5860bcdc7dfb448c98c913203184e339756d7;p=fio.git diff --git a/options.c b/options.c index 4ff4c9b4..4a54c98c 100644 --- a/options.c +++ b/options.c @@ -1002,6 +1002,15 @@ static int str_buffer_pattern_cb(void *data, const char *input) return ret; } +static int str_buffer_compress_cb(void *data, unsigned long long *il) +{ + struct thread_data *td = data; + + td->flags |= TD_F_COMPRESS; + td->o.compress_percentage = *il; + return 0; +} + static int str_verify_pattern_cb(void *data, const char *input) { struct thread_data *td = data; @@ -1605,6 +1614,16 @@ struct fio_option fio_options[FIO_MAX_OPTS] = { .category = FIO_OPT_C_FILE, .group = FIO_OPT_G_INVALID, }, + { + .name = "file_append", + .lname = "File append", + .type = FIO_OPT_BOOL, + .off1 = td_var_offset(file_append), + .help = "IO will start at the end of the file(s)", + .def = "0", + .category = FIO_OPT_C_FILE, + .group = FIO_OPT_G_INVALID, + }, { .name = "offset", .lname = "IO offset", @@ -3118,7 +3137,7 @@ struct fio_option fio_options[FIO_MAX_OPTS] = { .name = "buffer_compress_percentage", .lname = "Buffer compression percentage", .type = FIO_OPT_INT, - .off1 = td_var_offset(compress_percentage), + .cb = str_buffer_compress_cb, .maxval = 100, .minval = 0, .help = "How compressible the buffer is (approximately)",