engines/windowsaio: only set IOCP thread affinity if specified
[fio.git] / engines / windowsaio.c
index 13d7f19402a1759fa8c28f7e11b6e13686098e93..ff8b6e1b3e62331078108bae8dfd79cf850f7967 100644 (file)
@@ -107,7 +107,8 @@ static int fio_windowsaio_init(struct thread_data *td)
                        ctx->wd = wd;
                        wd->iothread = CreateThread(NULL, 0, IoCompletionRoutine, ctx, 0, &threadid);
 
-                       if (wd->iothread != NULL)
+                       if (wd->iothread != NULL &&
+                           fio_option_is_set(&td->o, cpumask))
                                fio_setaffinity(threadid, td->o.cpumask);
                        else
                                log_err("windowsaio: failed to create io completion thread\n");