size=x Set file size to x bytes (x string can include k/m/g)
offset=x Start io at offset x (x string can include k/m/g)
invalidate=x Invalidate page cache for file prior to doing io
+ sync=x Use sync writes if x and writing
Examples using cmd line jobs
unsigned int invalidate_cache;
unsigned long long file_size;
unsigned long long file_offset;
+ unsigned int sync_io;
cpu_set_t cpumask;
off_t cur_off;
else {
if (!td->overwrite)
flags |= O_TRUNC;
+ if (td->sync_io)
+ flags |= O_SYNC;
td->fd = open(td->file_name, flags | O_WRONLY | O_CREAT, 0600);
}
td->odirect = 0;
}
+ c = strstr(p, "sync=");
+ if (c) {
+ c += 5;
+ if (*c != '0')
+ td->sync_io = 1;
+ else
+ td->sync_io = 0;
+ }
+
c = strstr(p, "delay=");
if (c) {
c += 6;
fgetpos(f, &off);
continue;
}
+ if (!check_int(p, "sync", &td->sync_io)) {
+ fgetpos(f, &off);
+ continue;
+ }
if (!check_strcnv(p, "size", &td->file_size)) {
fgetpos(f, &off);
continue;