All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Denis V. Lunev" <den@virtuozzo.com>
To: Fiona Ebner <f.ebner@proxmox.com>,
	"Denis V. Lunev" <den@openvz.org>,
	qemu-devel@nongnu.org
Cc: qemu-block@nongnu.org, Kevin Wolf <kwolf@redhat.com>,
	qemu-stable@nongnu.org
Subject: Re: [PATCH] block: fix bdrv_next() skipping monitor-owned nodes
Date: Tue, 1 Sep 2026 14:50:42 +0200	[thread overview]
Message-ID: <95e5ffd8-d193-41ff-9d65-433ed2ce6949@virtuozzo.com> (raw)
In-Reply-To: <05df98ca-e5d7-4cb2-99d2-74a1a276f58a@proxmox.com>

On 9/1/26 14:23, Fiona Ebner wrote:
> Hi Denis,
>
> Am 29.08.26 um 12:20 AM schrieb Denis V. Lunev:
>> From: Denis V. Lunev <den@openvz.org>
>>
>> it->bs is the cursor into monitor_bdrv_states for the second phase of
>> bdrv_next(), so it has to be NULL when that phase starts. Commit
>> f6d38c9f6d made the first phase store the node it returns there, to
>> unreference the right one when the graph changes underneath. The cursor
>> is now left pointing at the last BlockBackend root, so the second phase
>> resumes from there instead of from the head of the list and never
>> returns a node added before it.
>>
>> A skipped node drops out of the vm_stop and migration handover paths:
>> not flushed, not inactivated, not snapshotted. bdrv_inactivate_all()
>> still reports success, so the node keeps its image lock and the
>> migration target cannot open the image. Only detached nodes are hit in
>> practice, as these callers also recurse into children.
>>
>> Reset the cursor when the second phase starts. old_bs is taken at the
>> top of the function, so f6d38c9f6d keeps working.
>>
>> Fixes: f6d38c9f6d ("block-backend: fix edge case in bdrv_next() where BDS associated to BB changes")
>> Signed-off-by: Denis V. Lunev <den@openvz.org>
>> Cc: Fiona Ebner <f.ebner@proxmox.com>
>> Cc: Kevin Wolf <kwolf@redhat.com>
> thank you for the fix!
>
> Reviewed-by: Fiona Ebner <f.ebner@proxmox.com>
> Tested-by: Fiona Ebner <f.ebner@proxmox.com>
>
> Should also go into stable I suppose?

Unsure. We do not know real consequences, there are no reports.
I found this problem by accident only testing migration with
big trees a lot.

Den


  reply	other threads:[~2026-09-01 12:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-28 22:20 [PATCH] block: fix bdrv_next() skipping monitor-owned nodes Denis V. Lunev
2026-09-01 12:23 ` Fiona Ebner
2026-09-01 12:50   ` Denis V. Lunev [this message]
2026-09-07 10:45 ` Denis V. Lunev

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=95e5ffd8-d193-41ff-9d65-433ed2ce6949@virtuozzo.com \
    --to=den@virtuozzo.com \
    --cc=den@openvz.org \
    --cc=f.ebner@proxmox.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@nongnu.org \
    /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.