qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1/4] block: Fix dirty bitmap in bdrv_co_discard


From: Fam Zheng
Subject: Re: [Qemu-devel] [PATCH 1/4] block: Fix dirty bitmap in bdrv_co_discard
Date: Wed, 6 May 2015 17:50:48 +0800
User-agent: Mutt/1.5.23 (2014-03-12)

On Wed, 05/06 10:59, Paolo Bonzini wrote:
> 
> 
> On 06/05/2015 03:45, Fam Zheng wrote:
> >> > This is not enough, you also have to do the discard in block/mirror.c,
> >> > otherwise the destination image could even become fully provisioned!
> > I wasn't sure what if src and dest have different 
> > can_write_zeroes_with_unmap
> > value, but your argument is stronger.
> > 
> > I will add discard in mirror.  Besides that, do we need to compare the
> > can_write_zeroes_with_unmap?
> 
> Hmm, if can_write_zeroes_with_unmap is set, it's probably better to
> write zeroes instead of discarding, in case the guest is relying on it.
> 

I think there are four cases:

 #   src can_write_zeroes_with_unmap       target can_write_zeroes_with_unmap
--------------------------------------------------------------------------------
 1              true                                   true
 2              true                                   false
 3              false                                  true
 4              false                                  false

I think replicating discard only works for 1, because both side would then read
0.  For case 2 & 3 it's probably better to mirror the actual reading of source.

I'm not sure about 4.

What do you think?

Fam



reply via email to

[Prev in Thread] Current Thread [Next in Thread]