Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
end_fsync=bool If true, fsync file contents when the job exits.
+fsync_on_close=bool If true, fio will fsync() a dirty file on close.
+ This differs from end_fsync in that it will happen on every
+ file close, not just at the end of the job.
+
rwmixcycle=int Value in milliseconds describing how often to switch between
reads and writes for a mixed workload. The default is
500 msecs.
if (--f->references)
return;
+ if (should_fsync(td) && td->fsync_on_close)
+ fsync(f->fd);
+
if (td->io_ops->close_file)
td->io_ops->close_file(td, f);
td->nr_open_files--;
unsigned int write_bw_log;
unsigned int norandommap;
unsigned int bs_unaligned;
+ unsigned int fsync_on_close;
unsigned int bs[2];
unsigned int min_bs[2];
.help = "Include fsync at the end of job",
.def = "0",
},
+ {
+ .name = "fsync_on_close",
+ .type = FIO_OPT_BOOL,
+ .off1 = td_var_offset(fsync_on_close),
+ .help = "fsync files on close",
+ .def = "0",
+ },
{
.name = "unlink",
.type = FIO_OPT_BOOL,