From: Jens Axboe Date: Tue, 5 Nov 2024 14:57:41 +0000 (-0700) Subject: t/io_uring: fix size confusion in allocate_mem() X-Git-Tag: fio-3.39~23 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=f2415d711a11fec6d5e4081a7bdc060b98c76043;p=fio.git t/io_uring: fix size confusion in allocate_mem() It should always be using the size passed in as to what amount of memory should be allocated, not the individual IO size. This didn't matter previously, as each buffer was allocated independently, but it matters now where a single region will cover all IO buffers. Signed-off-by: Jens Axboe --- diff --git a/t/io_uring.c b/t/io_uring.c index dec9552b..eea5fe0a 100644 --- a/t/io_uring.c +++ b/t/io_uring.c @@ -1006,7 +1006,7 @@ static void *allocate_mem(struct submitter *s, int size) return numa_alloc_onnode(size, s->numa_node); #endif - if (posix_memalign(&buf, t_io_uring_page_size, bs)) { + if (posix_memalign(&buf, t_io_uring_page_size, size)) { printf("failed alloc\n"); return NULL; }