All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: "Denis V. Lunev" <den@openvz.org>
Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org,
	Andrey Drobyshev <andrey.drobyshev@virtuozzo.com>,
	Hanna Reitz <hreitz@redhat.com>,
	qemu-stable@nongnu.org
Subject: Re: [PATCH v4 2/5] block: reject a reopen of an unusable node instead of crashing
Date: Tue, 6 Oct 2026 12:02:11 +0200	[thread overview]
Message-ID: <asTHI1FWnb4sWMVK@redhat.com> (raw)
In-Reply-To: <20260824133729.1141990-3-den@openvz.org>

Am 24.08.2026 um 15:37 hat Denis V. Lunev geschrieben:
> From: Denis V. Lunev <den@openvz.org>
> 
> qcow2_signal_corruption() drops bs->drv, so a node can lose its driver
> at any time and a reopen has to expect that. Both ends of the path
> assume otherwise:
> 
>   $ qemu-io -c "read 0 64k" -c "reopen -r" corrupt.qcow2
>   qcow2: Marking image as corrupt: Cluster allocation offset 0x1200
>   unaligned (L2 offset: 0x40000, L2 index: 0); ...
>   Segmentation fault
> 
> bdrv_reopen_queue_child() dereferences bs->drv while descending into
> the children the node opened itself, and bdrv_reopen_prepare() asserts
> on it. commit_clean() reopens the base of a commit job back to
> read-only, so a base which goes corrupt under the job arrives here too.
> 
> There is nothing to reopen for such a node, so stop descending into its
> children and let bdrv_reopen_prepare() report what every caller of
> bdrv_reopen() already handles. bdrv_reopen_commit() and
> bdrv_reopen_abort() keep their assertion, only a prepared entry reaches
> them.
> 
> Signed-off-by: Denis V. Lunev <den@openvz.org>
> Reviewed-by: Andrey Drobyshev <andrey.drobyshev@virtuozzo.com>
> CC: Kevin Wolf <kwolf@redhat.com>
> CC: Hanna Reitz <hreitz@redhat.com>
> CC: Andrey Drobyshev <andrey.drobyshev@virtuozzo.com>
> Cc: qemu-stable@nongnu.org

Reviewed-by: Kevin Wolf <kwolf@redhat.com>



  reply	other threads:[~2026-10-07  8:24 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-24 13:37 [PATCH v4 0/5] qcow2: silent corruption when a dirty image becomes writable Denis V. Lunev
2026-08-24 13:37 ` [PATCH v4 1/5] qcow2: do not clear the dirty bit when reopening a read-only node Denis V. Lunev
2026-10-06 10:01   ` Kevin Wolf
2026-08-24 13:37 ` [PATCH v4 2/5] block: reject a reopen of an unusable node instead of crashing Denis V. Lunev
2026-10-06 10:02   ` Kevin Wolf [this message]
2026-08-24 13:37 ` [PATCH v4 3/5] block: let bdrv_reopen_commit_post() report a failure Denis V. Lunev
2026-10-06 12:12   ` Kevin Wolf
2026-08-24 13:37 ` [PATCH v4 4/5] block: remember the flags a reopen starts from Denis V. Lunev
2026-08-24 13:37 ` [PATCH v4 5/5] qcow2: repair a dirty image when it becomes writable Denis V. Lunev
2026-08-25  9:37   ` Markus Armbruster
2026-08-26 13:49     ` Denis V. Lunev
2026-08-26 15:24       ` Markus Armbruster
2026-08-26 16:37         ` Denis V. Lunev
2026-08-27  9:15           ` Markus Armbruster
2026-08-27 16:06             ` Denis V. Lunev
2026-08-31 12:31               ` Markus Armbruster
2026-08-31 19:01                 ` Denis V. Lunev
2026-08-31 22:03                   ` Denis V. Lunev
2026-10-06 10:30             ` Kevin Wolf
2026-09-21 19:40 ` [PATCH v4 0/5] qcow2: silent corruption when a dirty image " Denis V. Lunev
2026-10-05  8:57 ` 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=asTHI1FWnb4sWMVK@redhat.com \
    --to=kwolf@redhat.com \
    --cc=andrey.drobyshev@virtuozzo.com \
    --cc=den@openvz.org \
    --cc=hreitz@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.