qemu-block
[Top][All Lists]
Advanced

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

Re: [Qemu-block] [PATCH 2/8] block: Drop useless bdrv_new() calls


From: Alberto Garcia
Subject: Re: [Qemu-block] [PATCH 2/8] block: Drop useless bdrv_new() calls
Date: Tue, 01 Dec 2015 11:31:43 +0100
User-agent: Notmuch/0.13.2 (http://notmuchmail.org) Emacs/23.2.1 (i486-pc-linux-gnu)

On Tue 10 Nov 2015 04:44:17 AM CET, Max Reitz wrote:
> bdrv_append_temp_snapshot() uses bdrv_new() to create an empty BDS
> before invoking bdrv_open() on that BDS. This is probably a relict from
> when it used to do some modifications on that empty BDS, but now that is
> unnecessary, so we can just set bs_snapshot to NULL and let bdrv_open()
> do the rest.
>
> The same applies to bdrv_open_backing_file(). There is even a bit more
> cruft here: The assert() was intended for the BDS which is indirectly
> passed as the first bdrv_open() argument, so we can now drop it, too.
>
> Signed-off-by: Max Reitz <address@hidden>

Reviewed-by: Alberto Garcia <address@hidden>

Berto



reply via email to

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