Windows sometimes gives us an IO request which hasn't completed yet,
which we need to ignore.
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
fov = CONTAINING_RECORD(ovl, FIO_OVERLAPPED, o);
io_u = fov->io_u;
fov = CONTAINING_RECORD(ovl, FIO_OVERLAPPED, o);
io_u = fov->io_u;
+ /* We sometimes get an IO request that hasn't completed yet. Ignore it. */
+ if (ovl->Internal == STATUS_PENDING)
+ continue;
+
if (ovl->Internal == ERROR_SUCCESS) {
io_u->resid = io_u->xfer_buflen - ovl->InternalHigh;
io_u->error = 0;
if (ovl->Internal == ERROR_SUCCESS) {
io_u->resid = io_u->xfer_buflen - ovl->InternalHigh;
io_u->error = 0;