[PATCH] Add support for unlinking io files
[fio.git] / filesetup.c
index e1afeb9a4bf552ff3b8fad4060f22ffdb6a9e696..04052bf368e6a0ebd2fb17e9af1e1c57fcf13f4b 100644 (file)
@@ -364,6 +364,8 @@ void close_files(struct thread_data *td)
                struct fio_file *f = &td->files[i];
 
                if (f->fd != -1) {
+                       if (td->unlink && td->filetype == FIO_TYPE_FILE)
+                               unlink(f->file_name);
                        close(f->fd);
                        f->fd = -1;
                }