[PATCH] Non-overwrite random write fix
authorJens Axboe <jens.axboe@oracle.com>
Mon, 8 Jan 2007 09:25:51 +0000 (10:25 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Mon, 8 Jan 2007 09:25:51 +0000 (10:25 +0100)
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
filesetup.c

index a14cd95..7528870 100644 (file)
@@ -154,9 +154,9 @@ static int file_size(struct thread_data *td, struct fio_file *f)
 
                if (!f->file_size || f->file_size > f->real_file_size)
                        f->file_size = f->real_file_size;
-       }
+       } else
+               f->real_file_size = f->file_size;
 
-       f->file_size = f->real_file_size - f->file_offset;
        return 0;
 }