Am 06.05.2016 um 14:54 hat Alberto Garcia geschrieben:
> On Fri 22 Apr 2016 07:42:37 PM CEST, Kevin Wolf wrote:
> > BlockBackends use it to get a back pointer from BdrvChild to
> > BlockBackend in any BdrvChildRole callbacks.
> 
> Hmmm... can anyone else use this, other than BlockBackend? If not, why
> is it opaque?

If we ever want to call BdrvChild callbacks from somewhere else than the
top of the image, there will be others users of this. For example, I
could imagine .resize() or .change_media() to propagate through the
whole tree when the host_cdrom driver detected a media change.

At the moment we probably don't have another use for it, but it's the
usual style that callbacks get an opaque value, so I just followed the
pattern here. (And I don't want people to abuse this to get back from
BDS to BB outside of such callbacks.)

Kevin

Reply via email to