From: Vincent Fu Date: Fri, 22 Nov 2024 16:29:05 +0000 (+0000) Subject: engines/io_uring_cmd: disable iomem=malloc check for metadata X-Git-Tag: fio-3.39~22 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=d78f2f3f33f9f5f64bfa7a71db22aac911eda162;p=fio.git engines/io_uring_cmd: disable iomem=malloc check for metadata 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 --- 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; }