Remove early directory check
authorJens Axboe <jens.axboe@oracle.com>
Mon, 26 May 2008 12:53:24 +0000 (14:53 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Mon, 26 May 2008 12:53:24 +0000 (14:53 +0200)
It wont work on FIO_DISKLESSIO engines and the engine isn't loaded
at this point so we cannot check. For now just disable the check.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
options.c

index ba57e4469d4ab4baf202b51c47702614b767941e..51914af4531e453d126aeecfa500fe8b4496cbf6 100644 (file)
--- a/options.c
+++ b/options.c
@@ -273,17 +273,24 @@ static int str_fst_cb(void *data, const char *str)
 static int check_dir(struct thread_data *td, char *fname)
 {
        char file[PATH_MAX], *dir;
-       struct stat sb;
        int elen = 0;
 
        if (td->o.directory) {
                strcpy(file, td->o.directory);
+               strcat(file, "/");
                elen = strlen(file);
        }
 
-       sprintf(file + elen, "/%s", fname);
+       sprintf(file + elen, "%s", fname);
        dir = dirname(file);
 
+#if 0
+       {
+       struct stat sb;
+       /*
+        * We can't do this on FIO_DISKLESSIO engines. The engine isn't loaded
+        * yet, so we can't do this check right here...
+        */
        if (lstat(dir, &sb) < 0) {
                int ret = errno;
 
@@ -296,6 +303,8 @@ static int check_dir(struct thread_data *td, char *fname)
                log_err("fio: %s is not a directory\n", dir);
                return 1;
        }
+       }
+#endif
 
        return 0;
 }