verify: make overwriting verified blocks warning more specific
authorSitsofe Wheeler <sitsofe@yahoo.com>
Fri, 17 Feb 2017 07:34:05 +0000 (07:34 +0000)
committerSitsofe Wheeler <sitsofe@yahoo.com>
Mon, 14 Aug 2017 02:25:24 +0000 (03:25 +0100)
Try to avoid warning when it looks like the filename used is being
auto-generated in a unique fashion and make the start of the warning
more consistent with other fio warnings.

Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
init.c

diff --git a/init.c b/init.c
index 42e710715a250e2eca8f2a6a8cd7c609e6571455..5054c54b4b71bbc470ae81eb91c9e6cdf8454229 100644 (file)
--- a/init.c
+++ b/init.c
@@ -731,9 +731,14 @@ static int fixup_options(struct thread_data *td)
                o->size = -1ULL;
 
        if (o->verify != VERIFY_NONE) {
-               if (td_write(td) && o->do_verify && o->numjobs > 1) {
-                       log_info("Multiple writers may overwrite blocks that "
-                               "belong to other jobs. This can cause "
+               if (td_write(td) && o->do_verify && o->numjobs > 1 &&
+                   (o->filename ||
+                    !(o->unique_filename &&
+                      strstr(o->filename_format, "$jobname") &&
+                      strstr(o->filename_format, "$jobnum") &&
+                      strstr(o->filename_format, "$filenum")))) {
+                       log_info("fio: multiple writers may overwrite blocks "
+                               "that belong to other jobs. This can cause "
                                "verification failures.\n");
                        ret = warnings_fatal;
                }