Fio Windows update
[fio.git] / os / os-windows.h
index 74c0f9e8e6cb63e07857206e11a81be8bdd006ad..f7712a1794f59a8fb8216222fd6f835ce2c52958 100644 (file)
@@ -1,7 +1,6 @@
 #ifndef FIO_OS_WINDOWS_H\r
 #define FIO_OS_WINDOWS_H\r
 \r
-\r
 #include <sys/types.h>\r
 #include <errno.h>\r
 #include <windows.h>\r
@@ -51,7 +50,6 @@ static inline int blockdev_size(struct fio_file *f, unsigned long long *bytes)
                *bytes = info.Length.QuadPart;\r
        else\r
                rc = EIO;\r
-       }\r
 \r
        /* If we were passed a POSIX fd,\r
         * close the HANDLE we created via CreateFile */\r
@@ -66,14 +64,10 @@ static inline int chardev_size(struct fio_file *f, unsigned long long *bytes)
        return blockdev_size(f, bytes);\r
 }\r
 \r
-{\r
-\r
 static inline int blockdev_invalidate_cache(struct fio_file *f)\r
 {\r
-       BOOL bSuccess = FlushFileBuffers(f->hFile);\r
-       if (!bSuccess)\r
-               log_info("blockdev_invalidate_cache - FlushFileBuffers failed\n");\r
-\r
+       /* There's no way to invalidate the cache in Windows\r
+        * so just pretend to succeed */\r
        return 0;\r
 }\r
 \r
@@ -95,5 +89,4 @@ static inline void os_get_tmpdir(char *path, int len)
 #define FIO_MADV_FREE  MADV_FREE\r
 #endif\r
 \r
-\r
 #endif /* FIO_OS_WINDOWS_H */\r