[pve-devel] applied: [PATCH pve-qemu 1/2] fix saving and loading dirty bitmaps in snapshots

Thomas Lamprecht t.lamprecht at proxmox.com
Tue Mar 16 20:48:34 CET 2021


On 16.03.21 17:30, Stefan Reiter wrote:
> Saving dirty bitmaps from our savevm-async code didn't work, since we
> use a coroutine which holds the iothread mutex already (upstream savevm
> is sync, migration uses a thread). Release the mutex before calling the
> one function that (according to it's documentation) requires the lock to
> *not* be held: qemu_savevm_state_pending.
> 
> Additionally, loading dirty bitmaps requires a call to
> dirty_bitmap_mig_before_vm_start after "loadvm", which the upstream
> savevm does explicitly afterwards - do that too.
> 
> This is exposed via the query-proxmox-support property
> "pbs-dirty-bitmap-savevm".
> 
> Signed-off-by: Stefan Reiter <s.reiter at proxmox.com>
> ---
> 
> This fixes a bug reported in the forum[0] as well as enterprise support.
> 
> This patch contains the actual fix, i.e. what makes it not crash, but we can
> actually go one step further, and by adding the query-proxmox-support info we
> can avoid crashes even with older versions (see patch 2/2).
> 
> As a neat side-effect, this also allows us to fix dirty bitmaps for snapshots
> and hibernate/resume, so that's a plus :)
> 
> [0] https://forum.proxmox.com/threads/query-savevm.85719/
> 
>  ...async-for-background-state-snapshots.patch | 15 +++++++++++----
>  ...add-optional-buffer-size-to-QEMUFile.patch |  6 +++---
>  ...dd-query_proxmox_support-QMP-command.patch | 19 ++++++++++++-------
>  ...E-add-query-pbs-bitmap-info-QMP-call.patch | 17 ++++++++++-------
>  ...-transaction-to-synchronize-job-stat.patch |  2 +-
>  ...-block-on-finishing-and-cleanup-crea.patch |  4 ++--
>  ...igrate-dirty-bitmap-state-via-savevm.patch | 18 ++++++++++--------
>  ...routine-QMP-for-backup-cancel_backup.patch |  4 ++--
>  .../pve/0043-PBS-add-master-key-support.patch | 16 ++++++++--------
>  9 files changed, 59 insertions(+), 42 deletions(-)
> 
>

applied, thanks!





More information about the pve-devel mailing list