all lists on 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 proxmox-backup-qemu 3/4] add state serializing and loading functions
Date: Wed, 28 Oct 2020 22:51:34 +0100	[thread overview]
Message-ID: <a938cbbb-ee97-382f-1e05-965a5d6871e5@proxmox.com> (raw)
In-Reply-To: <20201022153420.16971-4-s.reiter@proxmox.com>

On 22.10.20 17:34, Stefan Reiter wrote:
> For dirty-bitmap migration, QEMU also needs to move the static state of
> the library to the target. proxmox_{import,export}_state provide a means
> of accessing said data in a serialized fashion.
> 
> QEMU treats the state as some unknown quantity of bytes and the result
> does not need to be human-readable, so we encode it with 'bincode',
> which is based on serde.
> 
> Since the quantity is only known *after* serialization, we have to
> allocate the buffer ourselves. This is handled by Box::leak-ing a Rust
> allocated buffer and cleaning up via the explicit
> proxmox_free_state_buf function.
> 
> Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
> ---
> 
> I'm not sure we use 'bincode' anywhere else, but it is packaged for debian
> already and seemed like a good fit. Alternatively, we could of course use our
> already existing dependency on serde_json and just serialize to a JSON string.
> 
>  Cargo.toml      |  1 +
>  current-api.h   | 20 ++++++++++++++++++++
>  src/commands.rs | 19 +++++++++++++++++++
>  src/lib.rs      | 34 ++++++++++++++++++++++++++++++++++
>  4 files changed, 74 insertions(+)
> 
>

applied, thanks!




  reply	other threads:[~2020-10-28 21:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-22 15:34 [pve-devel] [PATCH 0/4] Keep dirty-bitmaps for PBS during migration Stefan Reiter
2020-10-22 15:34 ` [pve-devel] [PATCH qemu 1/4] migration/block-dirty-bitmap: fix larger granularity bitmaps Stefan Reiter
2020-10-22 15:34 ` [pve-devel] [PATCH qemu 2/4] PVE: Migrate dirty bitmap state via savevm Stefan Reiter
2020-10-22 15:34 ` [pve-devel] [PATCH proxmox-backup-qemu 3/4] add state serializing and loading functions Stefan Reiter
2020-10-28 21:51   ` Thomas Lamprecht [this message]
2020-10-22 15:34 ` [pve-devel] [PATCH qemu-server 4/4] migrate: enable dirty-bitmap migration Stefan Reiter
2020-10-29 18:13 ` [pve-devel] applied-series: [PATCH 0/4] Keep dirty-bitmaps for PBS during migration Thomas Lamprecht

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=a938cbbb-ee97-382f-1e05-965a5d6871e5@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 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.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal