Merge branch 'master' of ssh://router/data/git/fio
authorJens Axboe <jens.axboe@oracle.com>
Tue, 9 Jun 2009 10:48:56 +0000 (12:48 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Tue, 9 Jun 2009 10:48:56 +0000 (12:48 +0200)
filesetup.c
fio.h
init.c
io_ddir.h

index c902bdf7237f9896cd0577605a1211469225d99a..57928133369cdd520a1b89052cbc9362b773ca78 100644 (file)
@@ -132,7 +132,7 @@ static int extend_file(struct thread_data *td, struct fio_file *f)
                        goto err;
                }
        }
-       if (td->o.fill_device) {
+       if (td->o.fill_device && !td_write(td)) {
                fio_file_clear_size_known(f);
                if (td_io_get_file_size(td, f))
                        goto err;
@@ -290,6 +290,9 @@ static int __file_invalidate_cache(struct thread_data *td, struct fio_file *f,
        if (off == -1ULL)
                off = f->file_offset;
 
+       if (len == -1ULL || off == -1ULL)
+               return 0;
+
        dprint(FD_IO, "invalidate cache %s: %llu/%llu\n", f->file_name, off,
                                                                len);
 
diff --git a/fio.h b/fio.h
index 8e4f9dd6739e30932806675941454bb54eea3c38..c92629df5f280509cc4d43eb34db46ac3d37e67b 100644 (file)
--- a/fio.h
+++ b/fio.h
@@ -413,12 +413,6 @@ extern int fio_gtod_cpu;
 
 extern struct thread_data *threads;
 
-#define td_read(td)            ((td)->o.td_ddir & TD_DDIR_READ)
-#define td_write(td)           ((td)->o.td_ddir & TD_DDIR_WRITE)
-#define td_rw(td)              (((td)->o.td_ddir & TD_DDIR_RW) == TD_DDIR_RW)
-#define td_random(td)          ((td)->o.td_ddir & TD_DDIR_RAND)
-#define file_randommap(td, f)  (!(td)->o.norandommap && (f)->file_map)
-
 static inline void fio_ro_check(struct thread_data *td, struct io_u *io_u)
 {
        assert(!(io_u->ddir == DDIR_WRITE && !td_write(td)));
diff --git a/init.c b/init.c
index 80c329d3e454428a99a88046c4e605c47b75f9fb..f1f3dba3502c163f2ae1396b34c93a4b153e0ddb 100644 (file)
--- a/init.c
+++ b/init.c
@@ -20,7 +20,7 @@
 #include "filehash.h"
 #include "verify.h"
 
-static char fio_version_string[] = "fio 1.27";
+static char fio_version_string[] = "fio 1.27.1";
 
 #define FIO_RANDSEED           (0xb1899bedUL)
 
index 3d9a2050dfdc58db6e82ebaade22f79624ea957a..d2ee40ceefa5db7aaf93f10bacd6c0c29e6dc7ad 100644 (file)
--- a/io_ddir.h
+++ b/io_ddir.h
@@ -18,4 +18,10 @@ enum td_ddir {
        TD_DDIR_RANDRW          = TD_DDIR_RW | TD_DDIR_RAND,
 };
 
+#define td_read(td)            ((td)->o.td_ddir & TD_DDIR_READ)
+#define td_write(td)           ((td)->o.td_ddir & TD_DDIR_WRITE)
+#define td_rw(td)              (((td)->o.td_ddir & TD_DDIR_RW) == TD_DDIR_RW)
+#define td_random(td)          ((td)->o.td_ddir & TD_DDIR_RAND)
+#define file_randommap(td, f)  (!(td)->o.norandommap && (f)->file_map)
+
 #endif