On 06.05.19 17:34, Vladimir Sementsov-Ogievskiy wrote: > From: Andrey Shinkevich <andrey.shinkev...@virtuozzo.com> > > This patch is used in the 'block/stream: introduce a bottom node' > that is following. Instead of the base node, the caller may pass > the node that has the base as its backing image to the function > bdrv_is_allocated_above() with a new parameter include_base = true > and get rid of the dependency on the base that may change during > commit/stream parallel jobs. Now, if the specified base is not > found in the backing image chain, the QEMU will crash.
I don’t quite like crashing somewhere in bdrv_is_allocated(). If you want it to crash, it should do so at some deliberate point, e.g. by adding an assert(intermediate) at the beginning of the loop. Max > Suggested-by: Vladimir Sementsov-Ogievskiy <vsement...@virtuozzo.com> > Signed-off-by: Andrey Shinkevich <andrey.shinkev...@virtuozzo.com> > Signed-off-by: Vladimir Sementsov-Ogievskiy <vsement...@virtuozzo.com> > [only improve comment in block/io.c as Alberto suggested] > Reviewed-by: Alberto Garcia <be...@igalia.com> > --- > include/block/block.h | 3 ++- > block/commit.c | 2 +- > block/io.c | 20 ++++++++++++++------ > block/mirror.c | 2 +- > block/replication.c | 2 +- > block/stream.c | 2 +- > 6 files changed, 20 insertions(+), 11 deletions(-)
signature.asc
Description: OpenPGP digital signature