[PATCH] First cut syslet async io support
[fio.git] / init.c
diff --git a/init.c b/init.c
index 4fe1dce8b9b8a306ff30e8afcdf9f88a6ec06474..f4125b13c5f05c1064d07d5e12bf72d5295a034e 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",
@@ -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;