From: Max Reitz <mreitz@redhat.com>
To: Jeff Cody <jcody@redhat.com>, qemu-block@nongnu.org
Cc: kwolf@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com,
qemu-stable@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2 1/2] block: set device_list.tqe_prev to NULL on BDS removal
Date: Tue, 2 Feb 2016 18:02:03 +0100 [thread overview]
Message-ID: <56B0E10B.9010709@redhat.com> (raw)
In-Reply-To: <0cd51e11c0666c04ddb7c05293fe94afeb551e89.1454376655.git.jcody@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1423 bytes --]
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 <jcody@redhat.com>
> ---
> block.c | 24 ++++++++++++++----------
> blockdev.c | 3 +--
> include/block/block.h | 1 +
> 3 files changed, 16 insertions(+), 12 deletions(-)
Reviewed-by: Max Reitz <mreitz@redhat.com>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2016-02-02 17:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-02 1:33 [Qemu-devel] [PATCH v2 0/2] Active commit regression fix Jeff Cody
2016-02-02 1:33 ` [Qemu-devel] [PATCH v2 1/2] block: set device_list.tqe_prev to NULL on BDS removal Jeff Cody
2016-02-02 17:02 ` Max Reitz [this message]
2016-02-02 1:33 ` [Qemu-devel] [PATCH v2 2/2] block: qemu-iotests - add test for snapshot, commit, snapshot bug Jeff Cody
2016-02-02 17:03 ` Max Reitz
2016-02-02 17:08 ` [Qemu-devel] [PATCH v2 0/2] Active commit regression fix Max Reitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56B0E10B.9010709@redhat.com \
--to=mreitz@redhat.com \
--cc=jcody@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.