Fam Zheng 3d8b7aed60 block: Fix dirty bitmap in bdrv_co_discard
Unsetting dirty globally with discard is not very correct. The discard may zero
out sectors (depending on can_write_zeroes_with_unmap), we should replicate
this change to destination side to make sure that the guest sees the same data.

Calling bdrv_reset_dirty also troubles mirror job because the hbitmap iterator
doesn't expect unsetting of bits after current position.

So let's do it the opposite way which fixes both problems: set the dirty bits
if we are to discard it.

Reported-by: wangxiaolong@ucloud.cn
Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
(cherry picked from commit 508249952c)
Conflicts:
	block/io.c

* applied manually to avoid dependency on 61007b316
* squashed in 6e82e4b bdrv_reset_dirty() is static in
  2.3.0 and becomes unused as of this patch
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2015-07-29 21:46:07 -05:00
…
2015-02-06 16:11:38 +00:00
2015-03-19 11:30:37 +03:00
…
…
2015-04-04 09:45:59 +03:00
…
…
2015-02-23 10:56:09 -05:00
…
…
…
…
2015-03-25 13:38:07 +01:00
2015-02-16 17:30:19 +01:00
…
…
…
2015-03-19 11:35:52 +03:00
2015-03-17 14:31:15 +01:00
…
2015-04-02 15:58:39 +02:00
2015-02-05 17:16:14 +01:00
2015-07-28 18:14:07 -05:00
2015-02-16 15:07:19 +00:00
…
…
…
2015-01-14 10:38:57 +01:00
2015-02-12 21:21:38 -08:00
…
2015-03-10 09:26:22 +01:00
2015-04-24 15:05:06 +01:00
2015-03-26 15:31:46 +01:00

Read the documentation in qemu-doc.html or on http://wiki.qemu-project.org

- QEMU team
S
Description
A QEMU emulator for legacy Apple devices
Readme GPL-2.0
557 MiB
0 Stars 1 Watchers 0 Forks
Languages
C 82.9%
C++ 6.4%
Python 3.3%
Dylan 2.9%
Shell 1.6%
Other 2.7%