If the file was already there, don't unlink it.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
err = 0;
for_each_file(td, f, i) {
+ /*
+ * Only unlink files that we created.
+ */
+ f->unlink = 0;
if (file_ok(td, f)) {
+ f->unlink = td->unlink;
err = create_file(td, f);
if (err)
break;
int i;
for_each_file(td, f, i) {
- if (!td->filename && td->unlink &&
+ if (!td->filename && f->unlink &&
td->filetype == FIO_TYPE_FILE) {
unlink(f->file_name);
free(f->file_name);
unsigned long *file_map;
unsigned int num_maps;
+
+ unsigned int unlink;
};
/*