1 From b194d9117c084d148a3e4fee5c2b113faf799968 Mon Sep 17 00:00:00 2001
2 From: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 Date: Wed, 6 Apr 2016 16:43:38 +0200
4 Subject: [PATCH 49/55] backup: bdrv_set_enable_write_cache is no more
6 see: 09cf9db1bcd60d9889b774925ba7058286d35412
8 this reverts a hunk of our commit: backup: modify job api
10 block/backup.c | 9 +++------
11 1 file changed, 3 insertions(+), 6 deletions(-)
13 diff --git a/block/backup.c b/block/backup.c
14 index c38b520..f0e647d 100644
17 @@ -414,12 +414,9 @@ static void coroutine_fn backup_run(void *opaque)
19 job->done_bitmap = bitmap_new(end);
22 - bdrv_set_enable_write_cache(target, true);
24 - blk_set_on_error(target->blk, on_target_error, on_target_error);
25 - blk_iostatus_enable(target->blk);
27 + if (target && target->blk) {
28 + blk_set_on_error(target->blk, on_target_error, on_target_error);
29 + blk_iostatus_enable(target->blk);
32 bdrv_add_before_write_notifier(bs, &before_write);