diff --git a/debian/patches/pve/0025-block-backup-move-bcs-bitmap-initialization-to-job-c.patch b/debian/patches/pve/0025-block-backup-move-bcs-bitmap-initialization-to-job-c.patch new file mode 100644 index 0000000..6a540f8 --- /dev/null +++ b/debian/patches/pve/0025-block-backup-move-bcs-bitmap-initialization-to-job-c.patch @@ -0,0 +1,58 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Fabian Ebner +Date: Wed, 2 Mar 2022 08:35:05 +0100 +Subject: [PATCH] block/backup: move bcs bitmap initialization to job creation + +For backing up the state of multiple disks from the same time, a job +for each disk has to be created. It's convenient if the jobs don't +have to be started at the same time and if operation of the VM can be +resumed after job creation. This would lead to a window between job +creation and running the job, where writes can happen. But no writes +should happen between setting up the copy-before-write filter and +setting up the block copy state bitmap, because then new writes would +just pass through. + +Commit 06e0a9c16405c0a4c1eca33cf286cc04c42066a2 moved initalization of +the bitmap to setting up the copy-before-write filter when sync_mode +is not MIRROR_SYNC_MODE_BITMAP. Ensure that the bitmap is initialized +upon job creation for the remaining case too, by moving the +backup_init_bcs_bitmap call to backup_job_create. + +Signed-off-by: Fabian Ebner +--- + block/backup.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/block/backup.c b/block/backup.c +index 21d5983779..47e218857d 100644 +--- a/block/backup.c ++++ b/block/backup.c +@@ -239,8 +239,8 @@ static void backup_init_bcs_bitmap(BackupBlockJob *job) + assert(ret); + } else if (job->sync_mode == MIRROR_SYNC_MODE_TOP) { + /* +- * We can't hog the coroutine to initialize this thoroughly. +- * Set a flag and resume work when we are able to yield safely. ++ * Initialization is costly here. Simply set a flag and let the ++ * backup_run coroutine resume work once it can yield safely. + */ + block_copy_set_skip_unallocated(job->bcs, true); + } +@@ -254,8 +254,6 @@ static int coroutine_fn backup_run(Job *job, Error **errp) + BackupBlockJob *s = container_of(job, BackupBlockJob, common.job); + int ret; + +- backup_init_bcs_bitmap(s); +- + if (s->sync_mode == MIRROR_SYNC_MODE_TOP) { + int64_t offset = 0; + int64_t count; +@@ -493,6 +491,8 @@ BlockJob *backup_job_create(const char *job_id, BlockDriverState *bs, + block_job_add_bdrv(&job->common, "target", target, 0, BLK_PERM_ALL, + &error_abort); + ++ backup_init_bcs_bitmap(job); ++ + return &job->common; + + error: diff --git a/debian/patches/pve/0025-PVE-Backup-add-vma-backup-format-code.patch b/debian/patches/pve/0026-PVE-Backup-add-vma-backup-format-code.patch similarity index 100% rename from debian/patches/pve/0025-PVE-Backup-add-vma-backup-format-code.patch rename to debian/patches/pve/0026-PVE-Backup-add-vma-backup-format-code.patch diff --git a/debian/patches/pve/0026-PVE-Backup-add-backup-dump-block-driver.patch b/debian/patches/pve/0027-PVE-Backup-add-backup-dump-block-driver.patch similarity index 98% rename from debian/patches/pve/0026-PVE-Backup-add-backup-dump-block-driver.patch rename to debian/patches/pve/0027-PVE-Backup-add-backup-dump-block-driver.patch index aa6e992..f2d6f87 100644 --- a/debian/patches/pve/0026-PVE-Backup-add-backup-dump-block-driver.patch +++ b/debian/patches/pve/0027-PVE-Backup-add-backup-dump-block-driver.patch @@ -193,7 +193,7 @@ index 0000000000..93d7f46950 + return bs; +} diff --git a/block/backup.c b/block/backup.c -index 21d5983779..7d9aed1a60 100644 +index 47e218857d..4d8fad70c4 100644 --- a/block/backup.c +++ b/block/backup.c @@ -29,28 +29,6 @@ @@ -225,7 +225,7 @@ index 21d5983779..7d9aed1a60 100644 static const BlockJobDriver backup_job_driver; static void backup_cleanup_sync_bitmap(BackupBlockJob *job, int ret) -@@ -457,6 +435,14 @@ BlockJob *backup_job_create(const char *job_id, BlockDriverState *bs, +@@ -455,6 +433,14 @@ BlockJob *backup_job_create(const char *job_id, BlockDriverState *bs, } cluster_size = block_copy_cluster_size(bcs); diff --git a/debian/patches/pve/0027-PVE-Backup-proxmox-backup-patches-for-qemu.patch b/debian/patches/pve/0028-PVE-Backup-proxmox-backup-patches-for-qemu.patch similarity index 100% rename from debian/patches/pve/0027-PVE-Backup-proxmox-backup-patches-for-qemu.patch rename to debian/patches/pve/0028-PVE-Backup-proxmox-backup-patches-for-qemu.patch diff --git a/debian/patches/pve/0028-PVE-Backup-pbs-restore-new-command-to-restore-from-p.patch b/debian/patches/pve/0029-PVE-Backup-pbs-restore-new-command-to-restore-from-p.patch similarity index 100% rename from debian/patches/pve/0028-PVE-Backup-pbs-restore-new-command-to-restore-from-p.patch rename to debian/patches/pve/0029-PVE-Backup-pbs-restore-new-command-to-restore-from-p.patch diff --git a/debian/patches/pve/0029-PVE-Backup-Add-dirty-bitmap-tracking-for-incremental.patch b/debian/patches/pve/0030-PVE-Backup-Add-dirty-bitmap-tracking-for-incremental.patch similarity index 100% rename from debian/patches/pve/0029-PVE-Backup-Add-dirty-bitmap-tracking-for-incremental.patch rename to debian/patches/pve/0030-PVE-Backup-Add-dirty-bitmap-tracking-for-incremental.patch diff --git a/debian/patches/pve/0030-PVE-various-PBS-fixes.patch b/debian/patches/pve/0031-PVE-various-PBS-fixes.patch similarity index 100% rename from debian/patches/pve/0030-PVE-various-PBS-fixes.patch rename to debian/patches/pve/0031-PVE-various-PBS-fixes.patch diff --git a/debian/patches/pve/0031-PVE-Add-PBS-block-driver-to-map-backup-archives-into.patch b/debian/patches/pve/0032-PVE-Add-PBS-block-driver-to-map-backup-archives-into.patch similarity index 100% rename from debian/patches/pve/0031-PVE-Add-PBS-block-driver-to-map-backup-archives-into.patch rename to debian/patches/pve/0032-PVE-Add-PBS-block-driver-to-map-backup-archives-into.patch diff --git a/debian/patches/pve/0032-PVE-add-query_proxmox_support-QMP-command.patch b/debian/patches/pve/0033-PVE-add-query_proxmox_support-QMP-command.patch similarity index 100% rename from debian/patches/pve/0032-PVE-add-query_proxmox_support-QMP-command.patch rename to debian/patches/pve/0033-PVE-add-query_proxmox_support-QMP-command.patch diff --git a/debian/patches/pve/0033-PVE-add-query-pbs-bitmap-info-QMP-call.patch b/debian/patches/pve/0034-PVE-add-query-pbs-bitmap-info-QMP-call.patch similarity index 100% rename from debian/patches/pve/0033-PVE-add-query-pbs-bitmap-info-QMP-call.patch rename to debian/patches/pve/0034-PVE-add-query-pbs-bitmap-info-QMP-call.patch diff --git a/debian/patches/pve/0034-PVE-redirect-stderr-to-journal-when-daemonized.patch b/debian/patches/pve/0035-PVE-redirect-stderr-to-journal-when-daemonized.patch similarity index 100% rename from debian/patches/pve/0034-PVE-redirect-stderr-to-journal-when-daemonized.patch rename to debian/patches/pve/0035-PVE-redirect-stderr-to-journal-when-daemonized.patch diff --git a/debian/patches/pve/0035-PVE-Add-sequential-job-transaction-support.patch b/debian/patches/pve/0036-PVE-Add-sequential-job-transaction-support.patch similarity index 100% rename from debian/patches/pve/0035-PVE-Add-sequential-job-transaction-support.patch rename to debian/patches/pve/0036-PVE-Add-sequential-job-transaction-support.patch diff --git a/debian/patches/pve/0036-PVE-Backup-Use-a-transaction-to-synchronize-job-stat.patch b/debian/patches/pve/0037-PVE-Backup-Use-a-transaction-to-synchronize-job-stat.patch similarity index 100% rename from debian/patches/pve/0036-PVE-Backup-Use-a-transaction-to-synchronize-job-stat.patch rename to debian/patches/pve/0037-PVE-Backup-Use-a-transaction-to-synchronize-job-stat.patch diff --git a/debian/patches/pve/0037-PVE-Backup-Don-t-block-on-finishing-and-cleanup-crea.patch b/debian/patches/pve/0038-PVE-Backup-Don-t-block-on-finishing-and-cleanup-crea.patch similarity index 100% rename from debian/patches/pve/0037-PVE-Backup-Don-t-block-on-finishing-and-cleanup-crea.patch rename to debian/patches/pve/0038-PVE-Backup-Don-t-block-on-finishing-and-cleanup-crea.patch diff --git a/debian/patches/pve/0038-PVE-Migrate-dirty-bitmap-state-via-savevm.patch b/debian/patches/pve/0039-PVE-Migrate-dirty-bitmap-state-via-savevm.patch similarity index 100% rename from debian/patches/pve/0038-PVE-Migrate-dirty-bitmap-state-via-savevm.patch rename to debian/patches/pve/0039-PVE-Migrate-dirty-bitmap-state-via-savevm.patch diff --git a/debian/patches/pve/0039-migration-block-dirty-bitmap-migrate-other-bitmaps-e.patch b/debian/patches/pve/0040-migration-block-dirty-bitmap-migrate-other-bitmaps-e.patch similarity index 100% rename from debian/patches/pve/0039-migration-block-dirty-bitmap-migrate-other-bitmaps-e.patch rename to debian/patches/pve/0040-migration-block-dirty-bitmap-migrate-other-bitmaps-e.patch diff --git a/debian/patches/pve/0040-PVE-fall-back-to-open-iscsi-initiatorname.patch b/debian/patches/pve/0041-PVE-fall-back-to-open-iscsi-initiatorname.patch similarity index 100% rename from debian/patches/pve/0040-PVE-fall-back-to-open-iscsi-initiatorname.patch rename to debian/patches/pve/0041-PVE-fall-back-to-open-iscsi-initiatorname.patch diff --git a/debian/patches/pve/0041-PVE-Use-coroutine-QMP-for-backup-cancel_backup.patch b/debian/patches/pve/0042-PVE-Use-coroutine-QMP-for-backup-cancel_backup.patch similarity index 100% rename from debian/patches/pve/0041-PVE-Use-coroutine-QMP-for-backup-cancel_backup.patch rename to debian/patches/pve/0042-PVE-Use-coroutine-QMP-for-backup-cancel_backup.patch diff --git a/debian/patches/pve/0042-PBS-add-master-key-support.patch b/debian/patches/pve/0043-PBS-add-master-key-support.patch similarity index 100% rename from debian/patches/pve/0042-PBS-add-master-key-support.patch rename to debian/patches/pve/0043-PBS-add-master-key-support.patch diff --git a/debian/patches/pve/0043-PVE-block-pbs-fast-path-reads-without-allocation-if-.patch b/debian/patches/pve/0044-PVE-block-pbs-fast-path-reads-without-allocation-if-.patch similarity index 100% rename from debian/patches/pve/0043-PVE-block-pbs-fast-path-reads-without-allocation-if-.patch rename to debian/patches/pve/0044-PVE-block-pbs-fast-path-reads-without-allocation-if-.patch diff --git a/debian/patches/pve/0044-PVE-block-stream-increase-chunk-size.patch b/debian/patches/pve/0045-PVE-block-stream-increase-chunk-size.patch similarity index 100% rename from debian/patches/pve/0044-PVE-block-stream-increase-chunk-size.patch rename to debian/patches/pve/0045-PVE-block-stream-increase-chunk-size.patch diff --git a/debian/patches/pve/0045-block-io-accept-NULL-qiov-in-bdrv_pad_request.patch b/debian/patches/pve/0046-block-io-accept-NULL-qiov-in-bdrv_pad_request.patch similarity index 100% rename from debian/patches/pve/0045-block-io-accept-NULL-qiov-in-bdrv_pad_request.patch rename to debian/patches/pve/0046-block-io-accept-NULL-qiov-in-bdrv_pad_request.patch diff --git a/debian/patches/pve/0046-block-add-alloc-track-driver.patch b/debian/patches/pve/0047-block-add-alloc-track-driver.patch similarity index 100% rename from debian/patches/pve/0046-block-add-alloc-track-driver.patch rename to debian/patches/pve/0047-block-add-alloc-track-driver.patch diff --git a/debian/patches/pve/0047-PVE-whitelist-invalid-QAPI-names-for-backwards-compa.patch b/debian/patches/pve/0048-PVE-whitelist-invalid-QAPI-names-for-backwards-compa.patch similarity index 100% rename from debian/patches/pve/0047-PVE-whitelist-invalid-QAPI-names-for-backwards-compa.patch rename to debian/patches/pve/0048-PVE-whitelist-invalid-QAPI-names-for-backwards-compa.patch diff --git a/debian/patches/pve/0048-PVE-savevm-async-register-yank-before-migration_inco.patch b/debian/patches/pve/0049-PVE-savevm-async-register-yank-before-migration_inco.patch similarity index 100% rename from debian/patches/pve/0048-PVE-savevm-async-register-yank-before-migration_inco.patch rename to debian/patches/pve/0049-PVE-savevm-async-register-yank-before-migration_inco.patch diff --git a/debian/patches/pve/0049-qemu-img-dd-add-l-option-for-loading-a-snapshot.patch b/debian/patches/pve/0050-qemu-img-dd-add-l-option-for-loading-a-snapshot.patch similarity index 100% rename from debian/patches/pve/0049-qemu-img-dd-add-l-option-for-loading-a-snapshot.patch rename to debian/patches/pve/0050-qemu-img-dd-add-l-option-for-loading-a-snapshot.patch diff --git a/debian/patches/series b/debian/patches/series index a02a2d7..88d2332 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -37,28 +37,29 @@ pve/0021-PVE-Up-Config-file-posix-make-locking-optiono-on-cre.patch pve/0022-PVE-monitor-disable-oob-capability.patch pve/0023-PVE-Compat-4.0-used-balloon-qemu-4-0-config-size-fal.patch pve/0024-PVE-Allow-version-code-in-machine-type.patch -pve/0025-PVE-Backup-add-vma-backup-format-code.patch -pve/0026-PVE-Backup-add-backup-dump-block-driver.patch -pve/0027-PVE-Backup-proxmox-backup-patches-for-qemu.patch -pve/0028-PVE-Backup-pbs-restore-new-command-to-restore-from-p.patch -pve/0029-PVE-Backup-Add-dirty-bitmap-tracking-for-incremental.patch -pve/0030-PVE-various-PBS-fixes.patch -pve/0031-PVE-Add-PBS-block-driver-to-map-backup-archives-into.patch -pve/0032-PVE-add-query_proxmox_support-QMP-command.patch -pve/0033-PVE-add-query-pbs-bitmap-info-QMP-call.patch -pve/0034-PVE-redirect-stderr-to-journal-when-daemonized.patch -pve/0035-PVE-Add-sequential-job-transaction-support.patch -pve/0036-PVE-Backup-Use-a-transaction-to-synchronize-job-stat.patch -pve/0037-PVE-Backup-Don-t-block-on-finishing-and-cleanup-crea.patch -pve/0038-PVE-Migrate-dirty-bitmap-state-via-savevm.patch -pve/0039-migration-block-dirty-bitmap-migrate-other-bitmaps-e.patch -pve/0040-PVE-fall-back-to-open-iscsi-initiatorname.patch -pve/0041-PVE-Use-coroutine-QMP-for-backup-cancel_backup.patch -pve/0042-PBS-add-master-key-support.patch -pve/0043-PVE-block-pbs-fast-path-reads-without-allocation-if-.patch -pve/0044-PVE-block-stream-increase-chunk-size.patch -pve/0045-block-io-accept-NULL-qiov-in-bdrv_pad_request.patch -pve/0046-block-add-alloc-track-driver.patch -pve/0047-PVE-whitelist-invalid-QAPI-names-for-backwards-compa.patch -pve/0048-PVE-savevm-async-register-yank-before-migration_inco.patch -pve/0049-qemu-img-dd-add-l-option-for-loading-a-snapshot.patch +pve/0025-block-backup-move-bcs-bitmap-initialization-to-job-c.patch +pve/0026-PVE-Backup-add-vma-backup-format-code.patch +pve/0027-PVE-Backup-add-backup-dump-block-driver.patch +pve/0028-PVE-Backup-proxmox-backup-patches-for-qemu.patch +pve/0029-PVE-Backup-pbs-restore-new-command-to-restore-from-p.patch +pve/0030-PVE-Backup-Add-dirty-bitmap-tracking-for-incremental.patch +pve/0031-PVE-various-PBS-fixes.patch +pve/0032-PVE-Add-PBS-block-driver-to-map-backup-archives-into.patch +pve/0033-PVE-add-query_proxmox_support-QMP-command.patch +pve/0034-PVE-add-query-pbs-bitmap-info-QMP-call.patch +pve/0035-PVE-redirect-stderr-to-journal-when-daemonized.patch +pve/0036-PVE-Add-sequential-job-transaction-support.patch +pve/0037-PVE-Backup-Use-a-transaction-to-synchronize-job-stat.patch +pve/0038-PVE-Backup-Don-t-block-on-finishing-and-cleanup-crea.patch +pve/0039-PVE-Migrate-dirty-bitmap-state-via-savevm.patch +pve/0040-migration-block-dirty-bitmap-migrate-other-bitmaps-e.patch +pve/0041-PVE-fall-back-to-open-iscsi-initiatorname.patch +pve/0042-PVE-Use-coroutine-QMP-for-backup-cancel_backup.patch +pve/0043-PBS-add-master-key-support.patch +pve/0044-PVE-block-pbs-fast-path-reads-without-allocation-if-.patch +pve/0045-PVE-block-stream-increase-chunk-size.patch +pve/0046-block-io-accept-NULL-qiov-in-bdrv_pad_request.patch +pve/0047-block-add-alloc-track-driver.patch +pve/0048-PVE-whitelist-invalid-QAPI-names-for-backwards-compa.patch +pve/0049-PVE-savevm-async-register-yank-before-migration_inco.patch +pve/0050-qemu-img-dd-add-l-option-for-loading-a-snapshot.patch