public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [RFC v2 0/3] Add job transaction support for backup
@ 2020-08-25 13:15 Stefan Reiter
  2020-08-25 13:15 ` [pve-devel] [RFC v2 qemu 1/3] Revert "PVE-Backup: modify job api" Stefan Reiter
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Stefan Reiter @ 2020-08-25 13:15 UTC (permalink / raw)
  To: pve-devel

Still RFC and experimental, though with more (successful) testing since v1.

Our backup starts one QEMU block job per drive that is included in the final
archive. Currently, we start them all in 'paused' state, manually calling
job_start for the next one we whenever one calls its completion callback.

By using a transaction, we can automate that part, meaning we need a lot less
code in pve-backup.c. Additionally, we gain the benefit of having transactional
backups, which is important for dirty-bitmaps, since it allows us to keep all
bitmaps even when a backup fails or is aborted. QEMU does the heavy lifting
here, by already having support for transactions in backup jobs and handling the
bitmaps accordingly.

A small change to the job transaction API of QEMU is necessary (patch 2) to
allow the jobs to run in sequence, instead of all at once. This property is good
to have for several reasons, like not overloading a server, writing VMA files in
sequential order and supporting bandwidth limiting (which only works per job in
QEMU).

v2:
* revert/remove existing 'PVE-Backup: modify job api'


qemu: Stefan Reiter (3):
  Revert "PVE-Backup: modify job api"
  PVE: Add sequential job transaction support
  PVE-Backup: Use a transaction to synchronize job states

 block/backup.c            |   3 -
 block/replication.c       |   2 +-
 blockdev.c                |   3 +-
 include/block/block_int.h |   1 -
 include/qemu/job.h        |  12 +++
 job.c                     |  26 +++++-
 pve-backup.c              | 169 +++++++++++---------------------------
 7 files changed, 89 insertions(+), 127 deletions(-)

-- 
2.20.1




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

end of thread, other threads:[~2020-08-25 13:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-25 13:15 [pve-devel] [RFC v2 0/3] Add job transaction support for backup Stefan Reiter
2020-08-25 13:15 ` [pve-devel] [RFC v2 qemu 1/3] Revert "PVE-Backup: modify job api" Stefan Reiter
2020-08-25 13:15 ` [pve-devel] [RFC v2 qemu 2/3] PVE: Add sequential job transaction support Stefan Reiter
2020-08-25 13:15 ` [pve-devel] [RFC v2 qemu 3/3] PVE-Backup: Use a transaction to synchronize job states Stefan Reiter

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