X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=engines%2Fmmap.c;h=bd9a9428661abe38048233c0c56c5be256ee7311;hp=6671fc0e66d8e78e9f7c0fbeac8dd98a8b4d0946;hb=ff455a04f4e7;hpb=f6db4fa5a64501a3df72c2c4394d4c8d9fd9d991 diff --git a/engines/mmap.c b/engines/mmap.c index 6671fc0e..bd9a9428 100644 --- a/engines/mmap.c +++ b/engines/mmap.c @@ -15,9 +15,9 @@ #include "../verify.h" /* - * Limits us to 2GB of mapped files in total + * Limits us to 1GB of mapped files in total */ -#define MMAP_TOTAL_SZ (2 * 1024 * 1024 * 1024UL) +#define MMAP_TOTAL_SZ (1 * 1024 * 1024 * 1024UL) static unsigned long mmap_map_size; static unsigned long mmap_map_mask; @@ -90,9 +90,7 @@ static int fio_mmapio_prep(struct thread_data *td, struct io_u *io_u) if (f->mmap_sz > f->io_size) f->mmap_sz = f->io_size; - f->mmap_off = io_u->offset & ~mmap_map_mask; - if (io_u->offset + io_u->buflen >= f->mmap_off + f->mmap_sz) - f->mmap_off -= io_u->buflen; + f->mmap_off = io_u->offset; ret = fio_mmap_file(td, f, f->mmap_sz, f->mmap_off); done: