engines:io_uring: add missing error during open file
authorAnkit Kumar <ankit.kumar@samsung.com>
Mon, 14 Aug 2023 14:57:38 +0000 (20:27 +0530)
committerVincent Fu <vincent.fu@samsung.com>
Mon, 14 Aug 2023 14:27:33 +0000 (10:27 -0400)
This change ensures the error is propogated to upper layers to make fio
exit with a non-zero return code.
Add filename for errors when block size is not a multiple of logical
blocks.

Signed-off-by: Ankit Kumar <ankit.kumar@samsung.com>
Link: https://lore.kernel.org/r/20230814145747.114725-2-ankit.kumar@samsung.com
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
engines/io_uring.c

index b361e6a5bbad6ab16cd97f6bcdbb28779ef7d54c..0906546349a4a526d57e10156ccbfbe65e769ab0 100644 (file)
@@ -1115,10 +1115,12 @@ static int fio_ioring_cmd_open_file(struct thread_data *td, struct fio_file *f)
                        if (td->o.min_bs[ddir] % lba_size ||
                                td->o.max_bs[ddir] % lba_size) {
                                if (data->lba_ext)
-                                       log_err("block size must be a multiple of "
-                                               "(LBA data size + Metadata size)\n");
+                                       log_err("%s: block size must be a multiple of (LBA data size + Metadata size)\n",
+                                               f->file_name);
                                else
-                                       log_err("block size must be a multiple of LBA data size\n");
+                                       log_err("%s: block size must be a multiple of LBA data size\n",
+                                               f->file_name);
+                               td_verror(td, EINVAL, "fio_ioring_cmd_open_file");
                                return 1;
                        }
                 }