verify: increase state file name and log error on failure
authorJens Axboe <axboe@fb.com>
Wed, 11 May 2016 00:23:37 +0000 (18:23 -0600)
committerJens Axboe <axboe@fb.com>
Wed, 11 May 2016 00:23:37 +0000 (18:23 -0600)
Signed-off-by: Jens Axboe <axboe@fb.com>
verify.c

index 838db10d3cef39ce56b18f0d7deaf4390a86ddf9..58f37aefb65f2777f7fc344f46aae3c45f6c5eec 100644 (file)
--- a/verify.c
+++ b/verify.c
@@ -1471,7 +1471,7 @@ struct all_io_list *get_all_io_list(int save_mask, size_t *sz)
 static int open_state_file(const char *name, const char *prefix, int num,
                           int for_write)
 {
 static int open_state_file(const char *name, const char *prefix, int num,
                           int for_write)
 {
-       char out[64];
+       char out[PATH_MAX];
        int flags;
        int fd;
 
        int flags;
        int fd;
 
@@ -1485,6 +1485,7 @@ static int open_state_file(const char *name, const char *prefix, int num,
        fd = open(out, flags, 0644);
        if (fd == -1) {
                perror("fio: open state file");
        fd = open(out, flags, 0644);
        if (fd == -1) {
                perror("fio: open state file");
+               log_err("fio: state file: %s (for_write=%d)\n", out, for_write);
                return -1;
        }
 
                return -1;
        }