On 05/23/2016 10:55 AM, Kevin Wolf wrote: > When changing the BlockDriverState that a BdrvChild points to while the > node is currently drained, we must call the .drained_end() parent > callback. Conversely, when this means attaching a new node that is > already drained, we need to call .drained_begin(). > > bdrv_root_attach_child() takes now an opaque parameter, which is needed > because the callbacks must also be called if we're attaching a new child > to the BlockBackend when the root node is already drained, and they need > a way to identify the BlockBackend. Previously, child->opaque was set > too late and the callbacks would still see it as NULL. > > Signed-off-by: Kevin Wolf <kw...@redhat.com> > --- > block.c | 18 ++++++++++++++---- > block/block-backend.c | 9 +++++---- > include/block/block_int.h | 3 ++- > 3 files changed, 21 insertions(+), 9 deletions(-) >
Reviewed-by: Eric Blake <ebl...@redhat.com> -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature