From: Fiona Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH-SERIES qemu/qemu-server v2 0/9] mirror: fix regressions with blockdev and allow migration with 'ro' flag
Date: Wed, 11 Nov 2026 13:01:39 +0100 [thread overview]
Message-ID: <20261111120211.110737-1-f.ebner@proxmox.com> (raw)
Changes in v2:
* Adapt version in version check.
* Cherry-pick QEMU commit that landed upstream.
* Improve error handling for new 'nbdstop' implementation.
* In v1 the reopen was done directly after 'job-complete', but this
might be racy. Reopen only after the job actually finished.
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.
The relevant QEMU commit is picked from upstream. Since there already
was a 11.1.3 pve-qemu-kvm package without that commit, use 11.1.4 for
the version check, so the fix will get effective with the next stable
bump of QEMU.
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):
patches/extra: allow mirror job to use non-root block node
...d-support-for-sync-bitmap-mode-never.patch | 10 +-
...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 | 96 +++++++++++++++++++
...add-the-zeroinit-block-driver-filter.patch | 2 +-
...le-posix-make-locking-optiono-on-cre.patch | 2 +-
...ckup-Proxmox-backup-patches-for-QEMU.patch | 4 +-
...k-driver-to-map-backup-archives-into.patch | 2 +-
...igrate-dirty-bitmap-state-via-savevm.patch | 2 +-
.../0035-block-add-alloc-track-driver.patch | 2 +-
.../0036-PVE-backup-add-fleecing-option.patch | 2 +-
...ment-backup-access-setup-and-teardow.patch | 2 +-
debian/patches/series | 1 +
13 files changed, 113 insertions(+), 16 deletions(-)
create mode 100644 debian/patches/extra/0007-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 | 28 ++++++-
src/PVE/QemuMigrate.pm | 15 +++-
src/PVE/QemuServer.pm | 22 +++++-
src/PVE/QemuServer/BlockJob.pm | 117 +++++++++++++++++++++++++++--
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, 276 insertions(+), 39 deletions(-)
Summary over all repositories:
22 files changed, 389 insertions(+), 55 deletions(-)
--
Generated by git-murpp 0.5.0
next reply other threads:[~2026-11-11 12:02 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-11 12:01 Fiona Ebner [this message]
2026-11-11 12:01 ` [PATCH qemu v2 1/9] patches/extra: allow mirror job to use non-root block node Fiona Ebner
2026-11-11 12:01 ` [PATCH qemu-server v2 2/9] partially fix #7299: fix regression with guest IO limits applying to mirror job Fiona Ebner
2026-11-11 12:01 ` [PATCH qemu-server v2 3/9] partially fix #7299: migrate: fix regression with guest IO limits applying to NBD export Fiona Ebner
2026-11-11 12:01 ` [PATCH qemu-server v2 4/9] blockdev: attach: support explicitly attaching as writeable Fiona Ebner
2026-11-11 12:01 ` [PATCH qemu-server v2 5/9] blockdev: implement reopen function Fiona Ebner
2026-11-11 12:01 ` [PATCH qemu-server v2 6/9] partially fix #7836: allow mirror for drive with read-only flag when using blockdev Fiona Ebner
2026-11-11 12:01 ` [PATCH qemu-server v2 7/9] qm: schema: declare 'nbdstop' command as being for internal use only Fiona Ebner
2026-11-11 12:01 ` [PATCH qemu-server v2 8/9] migrate: log messages from remote nbdstop command Fiona Ebner
2026-11-11 12:01 ` [PATCH qemu-server v2 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=20261111120211.110737-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 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.