From d78f2f3f33f9f5f64bfa7a71db22aac911eda162 Mon Sep 17 00:00:00 2001 From: Vincent Fu Date: Fri, 22 Nov 2024 16:29:05 +0000 Subject: [PATCH] engines/io_uring_cmd: disable iomem=malloc check for metadata MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Before this patch, the io_uring_cmd ioengine would check that iomem=malloc (the default) before allocating memory for metadata buffers. If the user had selected a different option, fio would abort the job with an error message. This patch removes this check. We do not need to restrict users to iomem=malloc for io_uring_cmd workloads involving protection information. Users may wish to use huge pages for LBA data in order to submit larger IOs. Since metadata buffers will be smaller they can still use regular pages. Reported-by: 전규범 Signed-off-by: Vincent Fu --- engines/io_uring.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/engines/io_uring.c b/engines/io_uring.c index 79eacbc4..facc967f 100644 --- a/engines/io_uring.c +++ b/engines/io_uring.c @@ -1353,14 +1353,8 @@ static int fio_ioring_init(struct thread_data *td) md_size += page_mask + td->o.mem_align; if (td->o.mem_align && td->o.mem_align > page_size) md_size += td->o.mem_align - page_size; - if (td->o.mem_type == MEM_MALLOC) { - ld->md_buf = malloc(md_size); - if (!ld->md_buf) { - free(ld); - return 1; - } - } else { - log_err("fio: Only iomem=malloc or mem=malloc is supported\n"); + ld->md_buf = malloc(md_size); + if (!ld->md_buf) { free(ld); return 1; } -- 2.25.1