projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
io_uring: drop redundant IO_MODE_OFFLOAD check
[fio.git]
/
engines
/
windowsaio.c
diff --git
a/engines/windowsaio.c
b/engines/windowsaio.c
index ff8b6e1b3e62331078108bae8dfd79cf850f7967..9868e816adb68b8e196dc42d1832b8869e36fec3 100644
(file)
--- a/
engines/windowsaio.c
+++ b/
engines/windowsaio.c
@@
-106,12
+106,10
@@
static int fio_windowsaio_init(struct thread_data *td)
ctx->iocp = hFile;
ctx->wd = wd;
wd->iothread = CreateThread(NULL, 0, IoCompletionRoutine, ctx, 0, &threadid);
ctx->iocp = hFile;
ctx->wd = wd;
wd->iothread = CreateThread(NULL, 0, IoCompletionRoutine, ctx, 0, &threadid);
-
- if (wd->iothread != NULL &&
- fio_option_is_set(&td->o, cpumask))
- fio_setaffinity(threadid, td->o.cpumask);
- else
+ if (!wd->iothread)
log_err("windowsaio: failed to create io completion thread\n");
log_err("windowsaio: failed to create io completion thread\n");
+ else if (fio_option_is_set(&td->o, cpumask))
+ fio_setaffinity(threadid, td->o.cpumask);
}
if (rc || wd->iothread == NULL)
}
if (rc || wd->iothread == NULL)
@@
-163,15
+161,15
@@
static int windowsaio_invalidate_cache(struct fio_file *f)
if (ihFile != INVALID_HANDLE_VALUE) {
if (!CloseHandle(ihFile)) {
error = GetLastError();
if (ihFile != INVALID_HANDLE_VALUE) {
if (!CloseHandle(ihFile)) {
error = GetLastError();
- log_info("windowsaio: invalidation fd close %s
"
-
"failed: error %d\n",
f->file_name, error);
+ log_info("windowsaio: invalidation fd close %s
failed: error %lu\n",
+ f->file_name, error);
rc = 1;
}
} else {
error = GetLastError();
if (error != ERROR_FILE_NOT_FOUND) {
rc = 1;
}
} else {
error = GetLastError();
if (error != ERROR_FILE_NOT_FOUND) {
- log_info("windowsaio: cache invalidation of %s failed:
"
-
"error %d\n",
f->file_name, error);
+ log_info("windowsaio: cache invalidation of %s failed:
error %lu\n",
+ f->file_name, error);
rc = 1;
}
}
rc = 1;
}
}