[pve-devel] [RFC 0/2] Add job transaction support for backup
Stefan Reiter
s.reiter at proxmox.com
Thu Aug 20 15:48:35 CEST 2020
RFC since very experimental and only lightly tested.
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 1) 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).
qemu: Stefan Reiter (2):
PVE: Add sequential job transaction support
PVE-Backup: Use a transaction to synchronize job states
include/qemu/job.h | 12 ++++
job.c | 24 +++++++
pve-backup.c | 169 ++++++++++++++-------------------------------
3 files changed, 86 insertions(+), 119 deletions(-)
--
2.20.1
More information about the pve-devel
mailing list