[Top][All Lists]

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

Re: [Qemu-block] [PATCH v2 1/2] block: set device_list.tqe_prev to NULL

From: Max Reitz
Subject: Re: [Qemu-block] [PATCH v2 1/2] block: set device_list.tqe_prev to NULL on BDS removal
Date: Tue, 2 Feb 2016 18:02:03 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1

On 02.02.2016 02:33, Jeff Cody wrote:
> This fixes a regression introduced with commit 3f09bfbc7.  Multiple
> bugs arise in conjunction with live snapshots and mirroring operations
> (which include active layer commit).
> After a live snapshot occurs, the active layer and the base layer both
> have a non-NULL tqe_prev field in the device_list, although the base
> node's tqe_prev field points to a NULL entry.  This non-NULL tqe_prev
> field occurs after the bdrv_append() in the external snapshot calls
> change_parent_backing_link().
> In change_parent_backing_link(), when the previous active layer is
> removed from device_list, the device_list.tqe_prev pointer is not
> set to NULL.
> The operating scheme in the block layer is to indicate that a BDS belongs
> in the bdrv_states device_list iff the device_list.tqe_prev pointer
> is non-NULL.
> This patch does two things:
> 1.) Introduces a new block layer helper bdrv_device_remove() to remove a
>     BDS from the device_list, and
> 2.) uses that new API, which also fixes the regression once used in
>     change_parent_backing_link().
> Signed-off-by: Jeff Cody <address@hidden>
> ---
>  block.c               | 24 ++++++++++++++----------
>  blockdev.c            |  3 +--
>  include/block/block.h |  1 +
>  3 files changed, 16 insertions(+), 12 deletions(-)

Reviewed-by: Max Reitz <address@hidden>

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

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