[PATCH] syslet: fix leak of ring and ahu
[fio.git] / init.c
diff --git a/init.c b/init.c
index 4fe1dce8b9b8a306ff30e8afcdf9f88a6ec06474..f4a37401ec0b507eef3cc04252db1669be66457d 100644 (file)
--- a/init.c
+++ b/init.c
@@ -81,7 +81,7 @@ static struct fio_option options[] = {
                .help   = "IO engine to use",
                .def    = "sync",
                .posval = { "sync", "libaio", "posixaio", "mmap", "splice",
-                               "sg", "null", "net", },
+                               "sg", "null", "net", "syslet-rw" },
        },
        {
                .name   = "iodepth",
@@ -639,7 +639,7 @@ static void fixup_options(struct thread_data *td)
 static char *to_kmg(unsigned int val)
 {
        char *buf = malloc(32);
-       char post[] = { 0, 'K', 'M', 'G', 'P', 0 };
+       char post[] = { 0, 'K', 'M', 'G', 'P', 'E', 0 };
        char *p = post;
 
        do {
@@ -849,7 +849,7 @@ int init_random_state(struct thread_data *td)
 
        if (!td->norandommap) {
                for_each_file(td, f, i) {
-                       blocks = (f->file_size + td->rw_min_bs - 1) / td->rw_min_bs;
+                       blocks = (f->real_file_size + td->rw_min_bs - 1) / td->rw_min_bs;
                        num_maps = (blocks + BLOCKS_PER_MAP-1)/ BLOCKS_PER_MAP;
                        f->file_map = malloc(num_maps * sizeof(long));
                        f->num_maps = num_maps;