Am 17.07.2013 um 19:04 schrieb Paolo Bonzini <pbonz...@redhat.com>:

> Il 17/07/2013 19:02, Peter Lieven ha scritto:
>> For Disks we always use read/write16 so i think we Should also use 
>> writesame16. Or not?
> 
> Yes.
> 
> Remember you can still use UNMAP if LBPRZ=0.

I can always use it if writesame is not available, but in this case 
bdi->discard_zeroes must be 0.

Maybe we should call it discard_writes_zeroes or similar.

Discard_zeroes is sth that should only indicate if lbprz == 1. At least if we 
refer to the Linux ioctl. We could include both in BDI.

Peter

> 
> Paolo
> 
>> Von meinem iPhone gesendet
>> 
>> Am 17.07.2013 um 18:31 schrieb ronnie sahlberg <ronniesahlb...@gmail.com>:
>> 
>>> On Wed, Jul 17, 2013 at 9:27 AM, Paolo Bonzini <pbonz...@redhat.com> wrote:
>>>> Il 17/07/2013 17:54, ronnie sahlberg ha scritto:
>>>>> I think it is reasonable to assume that IF LBPRZ==1 and IF it is an
>>>>> "optimal unmap request" then the blocks will become unmapped and they
>>>>> will read back as 0.
>>>> 
>>>> Yes, but it is not reasonable to assume that bdrv_discard will only
>>>> receive "optimal" requests.  Thus, using WRITE SAME for LBPRZ=1, and not
>>>> exposing LBPRZ=1 if LBPWS=0 (may also use LBPWS10 depending on the
>>>> capacity), is the safer thing to do.
>>>> 
>>>> Paolo
>>> 
>>> ACK.
>>> 
>>> WRITESAME10/16 with UNMAP flag set is probably best.
> 

Reply via email to