On 28/05/2015 13:44, Fam Zheng wrote: > > The reason for doing it in the block layer is that it's in one place and > > we can be sure that it's applied. We can still in addition modify > > specific users to avoid even trying to send requests, but I think it's > > good to have the single place that always ensures correct functionality > > of the drain instead of making it dependent on the user. > > How to do that for the synchronous blk_write callers that don't run in > a coroutine?
They would be completely oblivious to it. Their call to blk_co_write would queue the request. Then blk_write calls aio_poll, which ultimately would result in blk_resume and unqueue the request. Paolo