Am 18.02.2020 um 13:42 hat Max Reitz geschrieben: > Any current user of child_file, child_format, and child_backing can and > should use this generic BdrvChildClass instead, as it can handle all of > these cases. However, to be able to do so, the users must pass the > appropriate BdrvChildRole when the child is created/attached. (The > following commits will take care of that.) > > Signed-off-by: Max Reitz <mre...@redhat.com> > Reviewed-by: Eric Blake <ebl...@redhat.com>
> block.c | 27 +++++++++++++++++++++++++++ > include/block/block_int.h | 1 + > 2 files changed, 28 insertions(+) > > diff --git a/block.c b/block.c > index 0f24546863..1d33f58ff8 100644 > --- a/block.c > +++ b/block.c > @@ -1094,6 +1094,33 @@ static void bdrv_inherited_options(BdrvChildRole role, > bool parent_is_format, > *child_flags = flags; > } > > +static int bdrv_backing_update_filename(BdrvChild *c, BlockDriverState *base, > + const char *filename, Error **errp); Actually, I should have saved the comment on the previous patch for this one. The forward declaration could easily be avoided by moving child_of_bds down to after bdrv_backing_update_filename(). Kevin