public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH-SERIES qemu/qemu-server 0/9] mirror: fix regressions with blockdev and allow migration with 'ro' flag
@ 2026-07-24 14:32 Fiona Ebner
  2026-07-24 14:32 ` [PATCH qemu 1/9] add patch to allow mirror job to use non-root block node Fiona Ebner
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Fiona Ebner @ 2026-07-24 14:32 UTC (permalink / raw)
  To: pve-devel

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




^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2026-07-24 14:34 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-24 14:32 [PATCH-SERIES qemu/qemu-server 0/9] mirror: fix regressions with blockdev and allow migration with 'ro' flag Fiona Ebner
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal