[pve-devel] [PATCH qemu] PVE-Backup: remove dirty-bitmap in pvebackup_complete_cb for failed jobs

Fabian Grünbichler f.gruenbichler at proxmox.com
Thu Jul 2 08:28:12 CEST 2020


it should also be possible to keep the old bitmap (and associated backup 
checksum) in this case? this is what bitmap-mode on-success is supposed 
to do, but maybe errors are not triggering the right code paths?

On July 1, 2020 2:17 pm, Dietmar Maurer wrote:
> Note: We remove the device from di_list, so pvebackup_co_cleanup does
> not handle this case.
> ---
>  pve-backup.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/pve-backup.c b/pve-backup.c
> index 61a8b4d2a4..1c4f6cf9e0 100644
> --- a/pve-backup.c
> +++ b/pve-backup.c
> @@ -318,6 +318,12 @@ static void pvebackup_complete_cb(void *opaque, int ret)
>      // remove self from job queue
>      backup_state.di_list = g_list_remove(backup_state.di_list, di);
>  
> +    if (di->bitmap && ret < 0) {
> +        // on error or cancel we cannot ensure synchronization of dirty
> +        // bitmaps with backup server, so remove all and do full backup next
> +        bdrv_release_dirty_bitmap(di->bitmap);
> +    }
> +
>      g_free(di);
>  
>      qemu_mutex_unlock(&backup_state.backup_mutex);
> -- 
> 2.20.1
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel at pve.proxmox.com
> https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
> 
> 




More information about the pve-devel mailing list