add the zeroinit block driver filter
[pve-qemu-kvm.git] / debian / patches / old / backup-vma-correctly-propagate-error.patch
blobb351947df16fd6d7d61b5e84661c9d3615fb0988
1 Index: new/vma-writer.c
2 ===================================================================
3 --- new.orig/vma-writer.c 2014-11-20 07:34:19.000000000 +0100
4 +++ new/vma-writer.c 2014-11-20 07:49:17.000000000 +0100
5 @@ -798,6 +798,13 @@
6 return transferred;
9 +void vma_writer_error_propagate(VmaWriter *vmaw, Error **errp)
11 + if (vmaw->status < 0 && *errp == NULL) {
12 + error_setg(errp, "%s", vmaw->errmsg);
13 + }
16 int vma_writer_close(VmaWriter *vmaw, Error **errp)
18 g_assert(vmaw != NULL);
19 Index: new/vma.h
20 ===================================================================
21 --- new.orig/vma.h 2014-11-20 07:34:27.000000000 +0100
22 +++ new/vma.h 2014-11-20 07:49:17.000000000 +0100
23 @@ -116,6 +116,7 @@
25 VmaWriter *vma_writer_create(const char *filename, uuid_t uuid, Error **errp);
26 int vma_writer_close(VmaWriter *vmaw, Error **errp);
27 +void vma_writer_error_propagate(VmaWriter *vmaw, Error **errp);
28 void vma_writer_destroy(VmaWriter *vmaw);
29 int vma_writer_add_config(VmaWriter *vmaw, const char *name, gpointer data,
30 size_t len);
31 Index: new/blockdev.c
32 ===================================================================
33 --- new.orig/blockdev.c 2014-11-20 07:49:14.000000000 +0100
34 +++ new/blockdev.c 2014-11-20 07:49:17.000000000 +0100
35 @@ -2015,7 +2015,7 @@
36 buf, &zero_bytes);
37 if (ret < 0) {
38 if (!backup_state.error) {
39 - error_setg(&backup_state.error, "vma_writer_write error %d", ret);
40 + vma_writer_error_propagate(backup_state.vmaw, &backup_state.error);
42 if (di->bs && di->bs->job) {
43 block_job_cancel(di->bs->job);