From: no-reply@sashiko.virtuozzo.com
To: andrey.drobyshev@virtuozzo.com, "Denis V. Lunev" <den@openvz.org>
Cc: svt-core@virtuozzo.com, den@openvz.org
Subject: Re: [PATCH hci-dev 1/2] qcow2: do not clear the dirty bit when reopening a read-only node #VSTOR-140073
Date: Wed, 4 Nov 2026 14:43:27 +0000 [thread overview]
Message-ID: <010701a1a703cf52-f2a7e637-04ad-4849-a09e-872723c2d909-000000@eu-central-1.amazonses.com> (raw)
In-Reply-To: <20261104144113.1587724-2-den@openvz.org>
> From: Denis V. Lunev <den@openvz.org>
>
> qcow2_reopen_prepare() clears the dirty bit whenever the node is
> reopened read-only, with an unguarded header write. A read-only node
> can still be dirty, inherited from an earlier writable session, and it
> holds no BLK_PERM_WRITE to resolve that. A read-only to read-only
> reopen of a dirty image therefore fails outright:
>
> $ qemu-io -r -f qcow2 dirty.qcow2 <<< $'reopen -r\nquit'
> qemu-io: failed while preparing to reopen image 'dirty.qcow2'
>
> Where the file node below is writable the write is not refused early,
> and bdrv_co_write_req_prepare() aborts on its BLK_PERM_WRITE assertion
> instead.
>
> Clear it only for a node that is writable now, the predicate
> qcow2_do_open() already uses for the repair. bdrv_is_writable() also
> excludes an inactive node, whose header must not be touched either.
>
> 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
> Message-ID: <20260824133729.1141990-2-den@openvz.org>
> Reviewed-by: Kevin Wolf <kwolf@redhat.com>
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261104144113.1587724-1-den@openvz.org?part=1
next prev parent reply other threads:[~2026-11-04 14:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-04 14:41 [PATCH hci-dev 0/2] qcow2, block: fix reopen of a dirty read-only node and of a corrupt " Denis V. Lunev
2026-11-04 14:41 ` [PATCH hci-dev 1/2] qcow2: do not clear the dirty bit when reopening a read-only " Denis V. Lunev
2026-11-04 14:43 ` no-reply [this message]
2026-11-04 14:41 ` [PATCH hci-dev 2/2] block: reject a reopen of an unusable node instead of crashing #VSTOR-140073 Denis V. Lunev
2026-11-04 14:43 ` no-reply
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=010701a1a703cf52-f2a7e637-04ad-4849-a09e-872723c2d909-000000@eu-central-1.amazonses.com \
--to=no-reply@sashiko.virtuozzo.com \
--cc=andrey.drobyshev@virtuozzo.com \
--cc=den@openvz.org \
--cc=svt-core@virtuozzo.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.