Am 28.06.2017 um 14:15 hat Manos Pitsidianakis geschrieben: > On Wed, Jun 28, 2017 at 01:27:36PM +0200, Kevin Wolf wrote: > >Am 23.06.2017 um 14:46 hat Manos Pitsidianakis geschrieben: > >>timer_cb() needs to know about the current Aio context of the throttle > >>request that is woken up. In order to make ThrottleGroupMember backend > >>agnostic, this information is stored in an aio_context field instead of > >>accessing it from BlockBackend. > >> > >>Signed-off-by: Manos Pitsidianakis <el13...@mail.ntua.gr> > > > >You're copying the AioContext when the BlockBackend is registered for > >the throttle group, but what keeps both sides in sync when the context > >is changed later on? Don't we need to update the ThrottleGroupMember in > >blk_set_aio_context? > > blk_set_aio_context calls throttle_timers_attach_aio_context which > updates this. Though as Alberto said util/throttle.c should not know > about ThrottleGroupMember. This is not needed in the later patches > because the ThrottleGroupMember's aio_context gets updated as a node > in the driver's bdrv_attach_aio_context > > We can add a new function in block/throttle.c that updates a > member's aio context but I'm not sure if it's really needed if > members are only used in throttle nodes.
Oh, I looked at the final state after the series instead of this very commit, so I missed the existing calls in blk_set_aio_context(). My bad, sorry for the noise. Kevin
pgpOh7c2AaLnP.pgp
Description: PGP signature