engines/io_uring_cmd: disable iomem=malloc check for metadata
authorVincent Fu <vincent.fu@samsung.com>
Fri, 22 Nov 2024 16:29:05 +0000 (16:29 +0000)
committerVincent Fu <vincent.fu@samsung.com>
Fri, 22 Nov 2024 19:47:25 +0000 (19:47 +0000)
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: 전규범 <gyubeom.jeon@samsung.com>
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
engines/io_uring.c

index 79eacbc408ed4addb3975c60a24a9e796d94112c..facc967f1a9ddda6e4951f0de388ea820c46bdc8 100644 (file)
@@ -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;
                }