public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
	Stefan Reiter <s.reiter@proxmox.com>
Subject: [pve-devel] applied: [PATCH pve-qemu 1/2] fix saving and loading dirty bitmaps in snapshots
Date: Tue, 16 Mar 2021 20:48:34 +0100	[thread overview]
Message-ID: <6ad8627d-a5b2-4dba-a546-23add9fc127f@proxmox.com> (raw)
In-Reply-To: <20210316163023.24534-1-s.reiter@proxmox.com>

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@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!




      parent reply	other threads:[~2021-03-16 19:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-16 16:30 [pve-devel] " Stefan Reiter
2021-03-16 16:30 ` [pve-devel] [PATCH qemu-server 2/2] snapshot: set migration caps before savevm-start Stefan Reiter
2021-03-16 19:51   ` [pve-devel] applied: " Thomas Lamprecht
2021-03-16 19:48 ` Thomas Lamprecht [this message]

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=6ad8627d-a5b2-4dba-a546-23add9fc127f@proxmox.com \
    --to=t.lamprecht@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    --cc=s.reiter@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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal