qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [PATCH v6 1/3] block: include base when checking image


From: Max Reitz
Subject: Re: [Qemu-block] [PATCH v6 1/3] block: include base when checking image chain for block allocation
Date: Tue, 28 May 2019 19:15:49 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1

On 06.05.19 17:34, Vladimir Sementsov-Ogievskiy wrote:
> From: Andrey Shinkevich <address@hidden>
> 
> 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 <address@hidden>
> Signed-off-by: Andrey Shinkevich <address@hidden>
> Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
>       [only improve comment in block/io.c as Alberto suggested]
> Reviewed-by: Alberto Garcia <address@hidden>
> ---
>  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(-)

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]