Merge branch 'evelu/cleanup' of https://github.com/ErwanAliasr1/fio
authorJens Axboe <axboe@kernel.dk>
Tue, 3 Oct 2017 15:29:35 +0000 (09:29 -0600)
committerJens Axboe <axboe@kernel.dk>
Tue, 3 Oct 2017 15:29:35 +0000 (09:29 -0600)
backend.c
io_u.c
oslib/libmtd.c
t/gen-rand.c

index e4eff378dfd4c736cdcf20436124ac147db4afdf..b1995ef4ff813de82e8e6b2045b78b709ce8e29c 100644 (file)
--- a/backend.c
+++ b/backend.c
@@ -499,7 +499,6 @@ int io_queue_event(struct thread_data *td, struct io_u *io_u, int *ret,
                        if (ddir_rw(io_u->ddir))
                                td->ts.short_io_u[io_u->ddir]++;
 
-                       f = io_u->file;
                        if (io_u->offset == f->real_file_size)
                                goto sync_done;
 
@@ -2347,6 +2346,7 @@ reap:
                                fio_terminate_threads(TERMINATE_ALL);
                                fio_abort = 1;
                                nr_started--;
+                               free(fd);
                                break;
                        }
                        dprint(FD_MUTEX, "done waiting on startup_mutex\n");
diff --git a/io_u.c b/io_u.c
index e98cd31806bd0da4ba2feaea33404e41a62eb17a..58c23202bd3d20bb1eee1b4fbcf1731d9bf312ea 100644 (file)
--- a/io_u.c
+++ b/io_u.c
@@ -662,7 +662,7 @@ int io_u_quiesce(struct thread_data *td)
 static enum fio_ddir rate_ddir(struct thread_data *td, enum fio_ddir ddir)
 {
        enum fio_ddir odir = ddir ^ 1;
-       long usec;
+       uint64_t usec;
        uint64_t now;
 
        assert(ddir_rw(ddir));
index 24e9db9cf062da307cd50cc11c17416152efdc73..5d18871b55e82f4c86704a9a284de2c9a519b9d8 100644 (file)
@@ -1002,7 +1002,6 @@ int mtd_torture(libmtd_t desc, const struct mtd_dev_info *mtd, int fd, int eb)
                }
        }
 
-       err = 0;
        normsg("PEB %d passed torture test, do not mark it a bad", eb);
 
 out:
index 6c31f92598fc1686e05f905be24237b576b61b18..4e9d39c6431eb097271b516d795e5ff0ef492dfc 100644 (file)
@@ -63,6 +63,6 @@ int main(int argc, char *argv[])
        }
 
        printf("Passes=%lu, Fail=%lu\n", pass, fail);
-
+       free(buckets);
        return 0;
 }