[PATCH 2/2] init: force threads when checking overlap in offload mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Vincent Fu <vincent.fu@xxxxxxx>

serialize_overlap combined with io_submit_mode=offload requires
threads. Print a warning and force the use of threads if the user
did not specify threads.
---
 init.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/init.c b/init.c
index a2b70c4a..224eb8ab 100644
--- a/init.c
+++ b/init.c
@@ -751,6 +751,14 @@ static int fixup_options(struct thread_data *td)
 	    o->io_submit_mode != IO_MODE_OFFLOAD)
 		o->serialize_overlap = 0;
 
+	if (o->serialize_overlap && o->io_submit_mode == IO_MODE_OFFLOAD && !o->use_thread) {
+		o->use_thread = 1;
+		log_info("fio: threads must be used when overlap checking is"
+			 " enabled in offload mode. Use the 'thread' option"
+			 " to get rid of this warning.\n");
+		ret |= warnings_fatal;
+	}
+
 	if (o->nr_files > td->files_index)
 		o->nr_files = td->files_index;
 
-- 
2.17.1




[Index of Archives]     [Linux Kernel]     [Linux SCSI]     [Linux IDE]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux