posixaio engine: residual data count
authorJens Axboe <jens.axboe@oracle.com>
Fri, 2 Mar 2007 18:42:37 +0000 (19:42 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Fri, 2 Mar 2007 18:42:37 +0000 (19:42 +0100)
If the io was cancelled, residual is the full data buffer length.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
engines/posixaio.c

index ebd6faf86b14b30e2dd4eabf8b5f9726d1d8d6aa..10340571af57fa79f2621027f937bcb424d6b554 100644 (file)
@@ -100,6 +100,7 @@ restart:
                        default:
                                io_u->error = err;
                        case ECANCELED:
+                               io_u->resid = io_u->xfer_buflen;
                        case 0:
                                pd->aio_events[r++] = io_u;
                                io_u->seen = 1;