Am 20.09.2021 um 13:55 hat Vladimir Sementsov-Ogievskiy geschrieben: > Use bdrv_new_open_driver_opts() instead of complicated bdrv_open(). > > Among other extra things bdrv_open() also check for white-listed > formats, which we don't want for internal node creation: currently > backup doesn't work when copy-before-write filter is not white-listed. > As well block-stream doesn't work when copy-on-read is not > white-listed. > > Fixes: 751cec7a261adaf1145dc7adf6de7c9c084e5a0b > Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2004812 > Reported-by: Yanan Fu > Signed-off-by: Vladimir Sementsov-Ogievskiy <vsement...@virtuozzo.com> > --- > block.c | 32 +++++++++++++++++++++++++++----- > 1 file changed, 27 insertions(+), 5 deletions(-) > > diff --git a/block.c b/block.c > index 3a90407b83..a174801785 100644 > --- a/block.c > +++ b/block.c > @@ -5134,11 +5134,29 @@ BlockDriverState *bdrv_insert_node(BlockDriverState > *bs, QDict *options, > ERRP_GUARD(); > int ret; > BlockDriverState *new_node_bs;
gcc tells me that this needs to be initialised now because of the bdrv_unref() aftert the fail: label. Fixed this up to be new_node_bs = NULL and applied the series to the block branch, thanks. Kevin