From: Fiona Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH-SERIES qemu/qemu-server 0/9] mirror: fix regressions with blockdev and allow migration with 'ro' flag
Date: Fri, 24 Jul 2026 16:32:21 +0200 [thread overview]
Message-ID: <20260724143240.211130-1-f.ebner@proxmox.com> (raw)
fix #7299:
Since the switch to -blockdev was made in Proxmox VE 9, the root block
node is now always a throttle node for optionally limiting the guest
IO. Mirror jobs are accidentally affected by a set limit too, because
the throttle root block node was passed as the source of the mirror
job. Fix this by allowing non-root nodes to be used for the mirror job
and passing along the node below throttle instead.
Unfortunately, my upstream submission for QEMU [0] has not received a
reply yet, and thus won't land in QEMU 11.1. Pick it up downstream for
now.
[0]: https://lore.kernel.org/qemu-devel/20260611102247.622275-1-f.ebner@proxmox.com/
fix #7836:
The switch to -blockdev in Proxmox VE 9 introduced a regression,
making clone of a VM with a read-only drive fail. The reason is that
the target node is also attached as read-only and thus cannot serve as
the mirror target. To fix the issue, open the mirror target as
writeable initially and in case the VM switched to the new drive,
re-open as read-only later. Note that the drive device is always
read-only for the guest, because the top throttle node is.
For migration, there is a similar issue, since a drive with read-only
cannot serve as a writeable block export for the NBD mirror target.
This is not a regression and was always broken, but can be resolved
for -blockdev by re-opening the node below throttle as writeable,
exporting it, and then re-opening it as read-only after finishing the
migration.
Not sure if applying the read-only flags to the nodes below throttle
is fully worth it. It does add some work and complexity, but for the
guest only the read-write status of the throttle node would actually
matter.
NOTE: The QEMU binary version in qemu-server patch "partially fix
#7299: fix regression with guest IO limits applying to mirror job" in
the runs_at_least_qemu_version() check needs to be adapted when
applying, to the pve-qemu version which actually does allow non-root
nodes as a mirror source.
pve-qemu:
Fiona Ebner (1):
add patch to allow mirror job to use non-root block node
...d-support-for-sync-bitmap-mode-never.patch | 8 +--
...check-for-bitmap-mode-without-bitmap.patch | 2 +-
.../0006-mirror-move-some-checks-to-qmp.patch | 2 +-
...ror-do-not-require-a-root-block-node.patch | 68 +++++++++++++++++++
...ckup-Proxmox-backup-patches-for-QEMU.patch | 2 +-
debian/patches/series | 1 +
6 files changed, 76 insertions(+), 7 deletions(-)
create mode 100644 debian/patches/extra/0053-blockdev-mirror-do-not-require-a-root-block-node.patch
qemu-server:
Fiona Ebner (8):
partially fix #7299: fix regression with guest IO limits applying to
mirror job
partially fix #7299: migrate: fix regression with guest IO limits
applying to NBD export
blockdev: attach: support explicitly attaching as writeable
blockdev: implement reopen function
partially fix #7836: allow mirror for drive with read-only flag when
using blockdev
qm: schema: declare 'nbdstop' command as being for internal use only
migrate: log messages from remote nbdstop command
partially fix #7836: allow migration for drive with read-only flag
when using blockdev
src/PVE/API2/Qemu.pm | 7 +-
src/PVE/CLI/qm.pm | 32 +++++++-
src/PVE/QemuMigrate.pm | 15 +++-
src/PVE/QemuServer.pm | 22 +++++-
src/PVE/QemuServer/BlockJob.pm | 120 ++++++++++++++++++++++++++++-
src/PVE/QemuServer/Blockdev.pm | 76 ++++++++++++++----
src/test/MigrationTest/QmMock.pm | 7 --
src/test/MigrationTest/Shared.pm | 35 +++++++++
src/test/run_qemu_migrate_tests.pl | 8 +-
9 files changed, 284 insertions(+), 38 deletions(-)
Summary over all repositories:
15 files changed, 360 insertions(+), 45 deletions(-)
--
Generated by git-murpp 0.5.0
next reply other threads:[~2026-07-24 14:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-24 14:32 Fiona Ebner [this message]
2026-07-24 14:32 ` [PATCH qemu 1/9] add patch to allow mirror job to use non-root block node Fiona Ebner
2026-07-24 14:32 ` [PATCH qemu-server 2/9] partially fix #7299: fix regression with guest IO limits applying to mirror job Fiona Ebner
2026-07-24 14:32 ` [PATCH qemu-server 3/9] partially fix #7299: migrate: fix regression with guest IO limits applying to NBD export Fiona Ebner
2026-07-24 14:32 ` [PATCH qemu-server 4/9] blockdev: attach: support explicitly attaching as writeable Fiona Ebner
2026-07-24 14:32 ` [PATCH qemu-server 5/9] blockdev: implement reopen function Fiona Ebner
2026-07-24 14:32 ` [PATCH qemu-server 6/9] partially fix #7836: allow mirror for drive with read-only flag when using blockdev Fiona Ebner
2026-07-24 14:32 ` [PATCH qemu-server 7/9] qm: schema: declare 'nbdstop' command as being for internal use only Fiona Ebner
2026-07-24 14:32 ` [PATCH qemu-server 8/9] migrate: log messages from remote nbdstop command Fiona Ebner
2026-07-24 14:32 ` [PATCH qemu-server 9/9] partially fix #7836: allow migration for drive with read-only flag when using blockdev Fiona Ebner
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=20260724143240.211130-1-f.ebner@proxmox.com \
--to=f.ebner@proxmox.com \
--cc=pve-devel@lists.proxmox.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox