This better explains what it does. Also add HOWTO and man page entries
for trimwrite.
Signed-off-by: Jens Axboe <axboe@fb.com>
randread Random reads
rw,readwrite Sequential mixed reads and writes
randrw Random mixed reads and writes
randread Random reads
rw,readwrite Sequential mixed reads and writes
randrw Random mixed reads and writes
+ trimwrite Mixed trims and writes. Blocks will be
+ trimmed first, then written to.
For the mixed io types, the default is to split them 50/50.
For certain types of io the result may still be skewed a bit,
For the mixed io types, the default is to split them 50/50.
For certain types of io the result may still be skewed a bit,
(td_write(td) && td->o.verify_backlog))
total_bytes += td->o.size;
(td_write(td) && td->o.verify_backlog))
total_bytes += td->o.size;
- /* In writetrim mode, each byte is trimmed and then written, so
+ /* In trimwrite mode, each byte is trimmed and then written, so
* allow total_bytes to be twice as big */
* allow total_bytes to be twice as big */
total_bytes += td->total_io_size;
while ((td->o.read_iolog_file && !flist_empty(&td->io_log_list)) ||
total_bytes += td->total_io_size;
while ((td->o.read_iolog_file && !flist_empty(&td->io_log_list)) ||
.TP
.B randrw
Mixed random reads and writes.
.TP
.B randrw
Mixed random reads and writes.
+.TP
+.B trimwrite
+Trim and write mixed workload. Blocks will be trimmed first, then the same
+blocks will be written to.
.RE
.P
For mixed I/O, the default split is 50/50. For certain types of io the result
.RE
.P
For mixed I/O, the default split is 50/50. For certain types of io the result
TD_DDIR_RANDWRITE = TD_DDIR_WRITE | TD_DDIR_RAND,
TD_DDIR_RANDRW = TD_DDIR_RW | TD_DDIR_RAND,
TD_DDIR_RANDTRIM = TD_DDIR_TRIM | TD_DDIR_RAND,
TD_DDIR_RANDWRITE = TD_DDIR_WRITE | TD_DDIR_RAND,
TD_DDIR_RANDRW = TD_DDIR_RW | TD_DDIR_RAND,
TD_DDIR_RANDTRIM = TD_DDIR_TRIM | TD_DDIR_RAND,
- TD_DDIR_WRITETRIM = TD_DDIR_TRIM | TD_DDIR_WRITE,
+ TD_DDIR_TRIMWRITE = TD_DDIR_TRIM | TD_DDIR_WRITE,
};
#define td_read(td) ((td)->o.td_ddir & TD_DDIR_READ)
};
#define td_read(td) ((td)->o.td_ddir & TD_DDIR_READ)
#define td_rw(td) (((td)->o.td_ddir & TD_DDIR_RW) == TD_DDIR_RW)
#define td_random(td) ((td)->o.td_ddir & TD_DDIR_RAND)
#define file_randommap(td, f) (!(td)->o.norandommap && fio_file_axmap((f)))
#define td_rw(td) (((td)->o.td_ddir & TD_DDIR_RW) == TD_DDIR_RW)
#define td_random(td) ((td)->o.td_ddir & TD_DDIR_RAND)
#define file_randommap(td, f) (!(td)->o.norandommap && fio_file_axmap((f)))
-#define td_writetrim(td) (((td)->o.td_ddir & TD_DDIR_WRITETRIM) \
- == TD_DDIR_WRITETRIM)
+#define td_trimwrite(td) (((td)->o.td_ddir & TD_DDIR_TRIMWRITE) \
+ == TD_DDIR_TRIMWRITE)
static inline int ddir_sync(enum fio_ddir ddir)
{
static inline int ddir_sync(enum fio_ddir ddir)
{
{
enum fio_ddir ddir = get_rw_ddir(td);
{
enum fio_ddir ddir = get_rw_ddir(td);
- if (td_writetrim(td)) {
+ if (td_trimwrite(td)) {
struct fio_file *f = io_u->file;
if (f->last_pos[DDIR_WRITE] == f->last_pos[DDIR_TRIM])
ddir = DDIR_TRIM;
struct fio_file *f = io_u->file;
if (f->last_pos[DDIR_WRITE] == f->last_pos[DDIR_TRIM])
ddir = DDIR_TRIM;
.oval = TD_DDIR_RANDRW,
.help = "Random read and write mix"
},
.oval = TD_DDIR_RANDRW,
.help = "Random read and write mix"
},
- { .ival = "writetrim",
- .oval = TD_DDIR_WRITETRIM,
- .help = "Write and trim mix, trims preceding writes"
+ { .ival = "trimwrite",
+ .oval = TD_DDIR_TRIMWRITE,
+ .help = "Trim and write mix, trims preceding writes"