Hi Scott, You might find https://www.fsl.cs.sunysb.edu/~vass/linux-aio.txt useful... On 4 April 2017 at 01:48, Scott Forman (scforman) <scforman@xxxxxxxxx> wrote: > > In looking further at fio_libaio_event(), I am wondering if it is possible to get the errno value if one of the events have an error (i.e. if ev->res != io_u->xfer_buflen). Note this handles one type of error - the case where the I/O was accepted at submission time but for some reason when it completed it was short or too long(?). As alluded to, errors can also be returned at submission time. It's also sensible to check that io_getevents hasn't errored too. > I see that io_u->error is set to –ev->res if ev->res is greater than io_u->xfer_buflen. But since my io_u->xfer_buflen is a large value, I am guessing that this is not the errno value that caused the error. Is that true? This isn't a true errno but rather is a synthesized fio error - I guess this is fio checking that it hasn't asked to store more than it allocated space for and trying to indicate that it's an error if this were to happen. > Also, if ev->res is less than io_u->xfer_buflen, then io_u->resid is set to (io_u->xfer_buflen - ev->res). Does that mean that there will be another attempt to write out the io_u->resid bytes? Not necessarily. For example what happens if you perform a write that goes past the end of the file - would you want to retry that even though it returned back as being short? Is the fact it came back short a definite error? -- Sitsofe | http://sucs.org/~sits/ -- To unsubscribe from this list: send the line "unsubscribe fio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html