On Tue, Jun 01, 2021 at 04:29:07PM -0500, Eric Blake wrote: > On Tue, Jun 01, 2021 at 07:57:28AM +0200, Sergio Lopez wrote: > > Before switching between AioContexts we need to make sure that we're > > fully quiesced ("nb_requests == 0" for every client) when entering the > > drained section. > > > > To do this, we set "quiescing = true" for every client on > > ".drained_begin" to prevent new coroutines to be created, and check if > > s/to be created/from being created/ > > > "nb_requests == 0" on ".drained_poll". Finally, once we're exiting the > > drained section, on ".drained_end" we set "quiescing = false" and > > call "nbd_client_receive_next_request()" to resume the processing of > > new requests. > > > > With these changes, "blk_aio_attach()" and "blk_aio_detach()" can be > > reverted to be as simple as they were before f148ae7d36. > > Is that reversion planned to be patch 3 of your series in v2?
Actually, we need part of the changes introduced in f148ae7d36, so it's probably simpler to manually revert "blk_aio_attach()" and "blk_aio_detach()" here than doing an actual reversion and then reintroducing the changes. Thanks, Sergio.
signature.asc
Description: PGP signature