fio: document locking for overlap checking in offload mode
[fio.git] / backend.c
index 1c60138c50b5a957b35378368734b83e906baf92..d6450baf1efdef1da5945445e7f9325c2e7f0efd 100644 (file)
--- a/backend.c
+++ b/backend.c
@@ -1874,6 +1874,11 @@ static void *thread_main(void *data)
                         "perhaps try --debug=io option for details?\n",
                         td->o.name, td->io_ops->name);
 
+       /*
+        * Acquire this lock if we were doing overlap checking in
+        * offload mode so that we don't clean up this job while
+        * another thread is checking its io_u's for overlap
+        */
        if (td_offload_overlap(td))
                pthread_mutex_lock(&overlap_check);
        td_set_runstate(td, TD_FINISHING);