Header doesn't really express that this has to do with io verification.
So rename the options to verify_offset and verify_interval.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
fast IO where the red-black tree sorting CPU time becomes
significant.
fast IO where the red-black tree sorting CPU time becomes
significant.
-header_offset=siint Swap the verification header with data somewhere else
+verify_offset=siint Swap the verification header with data somewhere else
in the block before writing. Its swapped back before
verifying.
in the block before writing. Its swapped back before
verifying.
-header_interval=siint Write the verification header at a finer granularity
+verify_interval=siint Write the verification header at a finer granularity
than the blocksize. It will be written for chunks the
size of header_interval. blocksize should divide this
evenly.
than the blocksize. It will be written for chunks the
size of header_interval. blocksize should divide this
evenly.
unsigned int sync_io;
unsigned int verify;
unsigned int verifysort;
unsigned int sync_io;
unsigned int verify;
unsigned int verifysort;
- unsigned int header_interval;
- unsigned int header_offset;
+ unsigned int verify_interval;
+ unsigned int verify_offset;
unsigned int use_thread;
unsigned int unlink;
unsigned int do_disk_util;
unsigned int use_thread;
unsigned int unlink;
unsigned int do_disk_util;
return add_dir_files(td, td->o.opendir);
}
return add_dir_files(td, td->o.opendir);
}
-static int str_header_offset_cb(void *data, unsigned int *off)
+static int str_verify_offset_cb(void *data, unsigned int *off)
{
struct thread_data *td = data;
{
struct thread_data *td = data;
if (*off && *off < sizeof(struct verify_header)) {
if (*off && *off < sizeof(struct verify_header)) {
- log_err("fio: header_offset too small\n");
+ log_err("fio: verify_offset too small\n");
- td->o.header_offset = *off;
+
+ td->o.verify_offset = *off;
- .name = "header_interval",
+ .name = "verify_interval",
.type = FIO_OPT_STR_VAL_INT,
.type = FIO_OPT_STR_VAL_INT,
- .off1 = td_var_offset(header_interval),
+ .off1 = td_var_offset(verify_interval),
.minval = 2 * sizeof(struct verify_header),
.minval = 2 * sizeof(struct verify_header),
- .help = "Store buffer header every N bytes",
+ .help = "Store verify buffer header every N bytes",
- .name = "header_offset",
+ .name = "verify_offset",
.type = FIO_OPT_STR_VAL_INT,
.type = FIO_OPT_STR_VAL_INT,
- .help = "Offset header location by N bytes",
+ .help = "Offset verify header location by N bytes",
- .cb = str_header_offset_cb,
+ .cb = str_verify_offset_cb,
},
{
.name = "write_iolog",
},
{
.name = "write_iolog",
return 0;
hdr_inc = io_u->buflen;
return 0;
hdr_inc = io_u->buflen;
- if (td->o.header_interval)
- hdr_inc = td->o.header_interval;
+ if (td->o.verify_interval)
+ hdr_inc = td->o.verify_interval;
for (p = io_u->buf; p < io_u->buf + io_u->buflen; p += hdr_inc) {
for (p = io_u->buf; p < io_u->buf + io_u->buflen; p += hdr_inc) {
- if (td->o.header_offset)
- memswp(p, p + td->o.header_offset, sizeof(*hdr));
+ if (td->o.verify_offset)
+ memswp(p, p + td->o.verify_offset, sizeof(*hdr));
fill_random_bytes(td, p, io_u->buflen);
hdr_inc = io_u->buflen;
fill_random_bytes(td, p, io_u->buflen);
hdr_inc = io_u->buflen;
- if (td->o.header_interval)
- hdr_inc = td->o.header_interval;
+ if (td->o.verify_interval)
+ hdr_inc = td->o.verify_interval;
data_len = hdr_inc - sizeof(*hdr);
for (;p < io_u->buf + io_u->buflen; p += hdr_inc) {
data_len = hdr_inc - sizeof(*hdr);
for (;p < io_u->buf + io_u->buflen; p += hdr_inc) {
log_err("fio: bad verify type: %d\n", td->o.verify);
assert(0);
}
log_err("fio: bad verify type: %d\n", td->o.verify);
assert(0);
}
- if (td->o.header_offset)
- memswp(p, p + td->o.header_offset, sizeof(*hdr));
+ if (td->o.verify_offset)
+ memswp(p, p + td->o.verify_offset, sizeof(*hdr));