On Thu, Jun 10, 2021 at 11:10:23AM +0200, Frank Kardel wrote: > Hi Brett, > > I meant the section in ststart1 where error is set to zero followed by goto > out inf the fixed blocksize part.
The biodone is missing, but also other parts. We have 5 cases. - I/O request is queued, error == 0. -> will be finished in callback. - I/O request is queued, error != 0. -> ststart calls biodone. - I/O request is not queued, error == EAGAIN -> ststart requeues request - I/O request is not queued, error != 0 -> ststart calls biodone. and - I/O request is not queued, error == 0 -> this is broken. I would make the last case return error == -1 instead (!= any possible errno value). In ststart errno is checked != 0, so it will - finish the I/O request for iostat. - call biodone The latter needs an adjustment like: bp->b_error = error < 0 ? 0 : error; so that the fake errno is replaced with end-of-file. If you don't like the fake errno, the function needs to return two values, the error value and a boolean to finish the unqueued request. Cleaner, but more changes. Greetings, -- Michael van Elst Internet: mlel...@serpens.de "A potential Snark may lurk in every tree."