Overwrite fix
authorJens Axboe <jens.axboe@oracle.com>
Mon, 12 Mar 2007 08:32:47 +0000 (09:32 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Mon, 12 Mar 2007 08:32:47 +0000 (09:32 +0100)
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
filesetup.c

index a85c08f..48b034a 100644 (file)
@@ -115,7 +115,7 @@ static int create_files(struct thread_data *td)
                for_each_file(td, f, i) {
                        int file_there = !file_ok(td, f);
 
                for_each_file(td, f, i) {
                        int file_there = !file_ok(td, f);
 
-                       if (file_there && td_write(td) && !can_extend) {
+                       if (file_there && td_write(td) && !td->overwrite) {
                                unlink(f->file_name);
                                file_there = 0;
                        }
                                unlink(f->file_name);
                                file_there = 0;
                        }