projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Makefile: Fix android compilation
[fio.git]
/
engines
/
windowsaio.c
diff --git
a/engines/windowsaio.c
b/engines/windowsaio.c
index 2b932f71460f196287e26b5f99d1509378ce3565..9868e816adb68b8e196dc42d1832b8869e36fec3 100644
(file)
--- a/
engines/windowsaio.c
+++ b/
engines/windowsaio.c
@@
-106,11
+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_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)
@@
-162,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;
}
}
@@
-354,8
+353,8
@@
static int fio_windowsaio_getevents(struct thread_data *td, unsigned int min,
return dequeued;
}
return dequeued;
}
-static enum fio_q_status
-
fio_windowsaio_queue(struct thread_data *td,
struct io_u *io_u)
+static enum fio_q_status
fio_windowsaio_queue(struct thread_data *td,
+
struct io_u *io_u)
{
struct fio_overlapped *o = io_u->engine_data;
LPOVERLAPPED lpOvl = &o->o;
{
struct fio_overlapped *o = io_u->engine_data;
LPOVERLAPPED lpOvl = &o->o;