On 05/21/2015 09:40 PM, Fam Zheng wrote: > 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 destinition side to make sure that the guest sees the same > data.
s/destinition/destination/ > > 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: wangxiaol...@ucloud.cn > Signed-off-by: Fam Zheng <f...@redhat.com> > Reviewed-by: Paolo Bonzini <pbonz...@redhat.com> > --- > block/io.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Eric Blake <ebl...@redhat.com> -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature