Make 'unlink' a bool and fix bug in directory setup.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
create_fsync=bool fsync the data file after creation. This is the
default.
create_fsync=bool fsync the data file after creation. This is the
default.
-unlink Unlink the job files when done. fio defaults to doing this,
+unlink=bool Unlink the job files when done. fio defaults to doing this,
if it created the file itself.
loops=int Run the specified number of iterations of this job. Used
if it created the file itself.
loops=int Run the specified number of iterations of this job. Used
- .type = FIO_OPT_STR_SET,
.off1 = td_var_offset(unlink),
},
{
.off1 = td_var_offset(unlink),
},
{
int len = 0;
if (td->directory && td->directory[0] != '\0')
int len = 0;
if (td->directory && td->directory[0] != '\0')
- sprintf(tmp, "%s/", td->directory);
+ len = sprintf(tmp, "%s/", td->directory);
td->files = malloc(sizeof(struct fio_file) * td->nr_files);
td->files = malloc(sizeof(struct fio_file) * td->nr_files);
else
sprintf(tmp + len, "%s.%d.%d", jobname, td->thread_number, i);
f->file_name = strdup(tmp);
else
sprintf(tmp + len, "%s.%d.%d", jobname, td->thread_number, i);
f->file_name = strdup(tmp);
+ fprintf(stderr, "%s\n", f->file_name);
}
} else {
td->nr_files = 1;
}
} else {
td->nr_files = 1;