[PATCH] Add seperate read/write block size options
[fio.git] / filesetup.c
index 0b9564044d14135d662363219471c674c2670714..a1633827fe8eca63017bb8a2d91b731dd9854b73 100644 (file)
@@ -49,12 +49,12 @@ static int create_file(struct thread_data *td, struct fio_file *f)
                goto err;
        }
 
-       b = malloc(td->max_bs);
-       memset(b, 0, td->max_bs);
+       b = malloc(td->max_bs[DDIR_WRITE]);
+       memset(b, 0, td->max_bs[DDIR_WRITE]);
 
        left = f->file_size;
        while (left && !td->terminate) {
-               bs = td->max_bs;
+               bs = td->max_bs[DDIR_WRITE];
                if (bs > left)
                        bs = left;