if a destination has has_zero_init = 0, but it supports
discard zeroes use discard to convert the target
into an all zero device.
Signed-off-by: Peter Lieven
---
qemu-img.c | 56 +++-
1 file changed, 55 insertions(+), 1 deletion(-)
diff --gi
On 18.07.2013 16:14, Paolo Bonzini wrote:
Il 18/07/2013 15:55, ronnie sahlberg ha scritto:
bdrv->write_zeroes will use writesame16 and set the unmap flag only if
BDRV_MAY_DISCARD == 1 and BDRV_O_UNMAP == 1 and lbprz == 1.
When you use WRITESAME16 you can ignore the lbprz flag.
Just send a WRITE
Il 12/09/2013 10:52, Peter Lieven ha scritto:
> On 18.07.2013 16:14, Paolo Bonzini wrote:
>> Il 18/07/2013 15:55, ronnie sahlberg ha scritto:
> bdrv->write_zeroes will use writesame16 and set the unmap flag only if
> BDRV_MAY_DISCARD == 1 and BDRV_O_UNMAP == 1 and lbprz == 1.
>>> When you u
On 12.09.2013 10:55, Paolo Bonzini wrote:
Il 12/09/2013 10:52, Peter Lieven ha scritto:
On 18.07.2013 16:14, Paolo Bonzini wrote:
Il 18/07/2013 15:55, ronnie sahlberg ha scritto:
bdrv->write_zeroes will use writesame16 and set the unmap flag only if
BDRV_MAY_DISCARD == 1 and BDRV_O_UNMAP == 1
Il 17/07/2013 10:46, Kevin Wolf ha scritto:
> Am 15.07.2013 um 12:49 hat Peter Lieven geschrieben:
>> if a destination has has_zero_init = 0, but it supports
>> discard zeroes use discard to convert the target
>> into an all zero device.
>>
>> Signed-off-by: Peter Lieven
>
> Wouldn't it be better
Am 17.07.2013 um 11:58 schrieb Paolo Bonzini :
> Il 17/07/2013 10:46, Kevin Wolf ha scritto:
>> Am 15.07.2013 um 12:49 hat Peter Lieven geschrieben:
>>> if a destination has has_zero_init = 0, but it supports
>>> discard zeroes use discard to convert the target
>>> into an all zero device.
>>>
>
Am 17.07.2013 um 10:46 schrieb Kevin Wolf :
> Am 15.07.2013 um 12:49 hat Peter Lieven geschrieben:
>> if a destination has has_zero_init = 0, but it supports
>> discard zeroes use discard to convert the target
>> into an all zero device.
>>
>> Signed-off-by: Peter Lieven
>
> Wouldn't it be bet
Am 17.07.2013 um 11:58 hat Paolo Bonzini geschrieben:
> Il 17/07/2013 10:46, Kevin Wolf ha scritto:
> > Am 15.07.2013 um 12:49 hat Peter Lieven geschrieben:
> >> if a destination has has_zero_init = 0, but it supports
> >> discard zeroes use discard to convert the target
> >> into an all zero devic
Am 17.07.2013 um 12:21 hat Peter Lieven geschrieben:
>
> Am 17.07.2013 um 11:58 schrieb Paolo Bonzini :
>
> > Il 17/07/2013 10:46, Kevin Wolf ha scritto:
> >> Am 15.07.2013 um 12:49 hat Peter Lieven geschrieben:
> >>> if a destination has has_zero_init = 0, but it supports
> >>> discard zeroes us
Am 17.07.2013 um 12:27 schrieb Kevin Wolf :
> Am 17.07.2013 um 12:21 hat Peter Lieven geschrieben:
>>
>> Am 17.07.2013 um 11:58 schrieb Paolo Bonzini :
>>
>>> Il 17/07/2013 10:46, Kevin Wolf ha scritto:
Am 15.07.2013 um 12:49 hat Peter Lieven geschrieben:
> if a destination has has_zer
Il 17/07/2013 12:21, Peter Lieven ha scritto:
>> > BTW, Peter and Ronnie: we were assuming that UNMAP with LBPRZ=1 always
>> > zeroes blocks, but is that true for unaligned operations?
> Good question, I will pass it to ronnie. My guess is that the command will
> fail with
> a check condition if i
Il 17/07/2013 12:27, Kevin Wolf ha scritto:
> Am 17.07.2013 um 12:21 hat Peter Lieven geschrieben:
>>
>> Am 17.07.2013 um 11:58 schrieb Paolo Bonzini :
>>
>>> Il 17/07/2013 10:46, Kevin Wolf ha scritto:
Am 15.07.2013 um 12:49 hat Peter Lieven geschrieben:
> if a destination has has_zero_in
Am 17.07.2013 um 12:47 schrieb Paolo Bonzini :
> Il 17/07/2013 12:27, Kevin Wolf ha scritto:
>> Am 17.07.2013 um 12:21 hat Peter Lieven geschrieben:
>>>
>>> Am 17.07.2013 um 11:58 schrieb Paolo Bonzini :
>>>
Il 17/07/2013 10:46, Kevin Wolf ha scritto:
> Am 15.07.2013 um 12:49 hat Pete
Am 17.07.2013 um 12:45 schrieb Paolo Bonzini :
> Il 17/07/2013 12:21, Peter Lieven ha scritto:
BTW, Peter and Ronnie: we were assuming that UNMAP with LBPRZ=1 always
zeroes blocks, but is that true for unaligned operations?
>> Good question, I will pass it to ronnie. My guess is that t
Il 17/07/2013 16:21, Peter Lieven ha scritto:
> Am 17.07.2013 um 12:45 schrieb Paolo Bonzini :
>> Il 17/07/2013 12:21, Peter Lieven ha scritto:
> BTW, Peter and Ronnie: we were assuming that UNMAP with LBPRZ=1 always
> zeroes blocks, but is that true for unaligned operations?
>>> Good quest
On Wed, Jul 17, 2013 at 3:25 AM, Kevin Wolf wrote:
> Am 17.07.2013 um 11:58 hat Paolo Bonzini geschrieben:
>> Il 17/07/2013 10:46, Kevin Wolf ha scritto:
>> > Am 15.07.2013 um 12:49 hat Peter Lieven geschrieben:
>> >> if a destination has has_zero_init = 0, but it supports
>> >> discard zeroes use
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
On Wed, Jul 17, 2013 at 9:27 AM, Paolo Bonzini 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 re
For Disks we always use read/write16 so i think we Should also use writesame16.
Or not?
Von meinem iPhone gesendet
Am 17.07.2013 um 18:31 schrieb ronnie sahlberg :
> On Wed, Jul 17, 2013 at 9:27 AM, Paolo Bonzini wrote:
>> Il 17/07/2013 17:54, ronnie sahlberg ha scritto:
>>> I think it is reas
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.
Paolo
> Von meinem iPhone gesendet
>
> Am 17.07.2013 um 18:31 schrieb ronnie sahlberg :
>
>> On Wed, Jul
On Wed, Jul 17, 2013 at 10:02 AM, Peter Lieven wrote:
> For Disks we always use read/write16 so i think we Should also use
> writesame16. Or not?
Sounds good.
>
> Von meinem iPhone gesendet
>
> Am 17.07.2013 um 18:31 schrieb ronnie sahlberg :
>
>> On Wed, Jul 17, 2013 at 9:27 AM, Paolo Bonzini
Am 17.07.2013 um 19:04 schrieb Paolo Bonzini :
> 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 availa
Il 17/07/2013 19:48, Peter Lieven ha scritto:
>
> Am 17.07.2013 um 19:04 schrieb Paolo Bonzini :
>
>> 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
Am 17.07.2013 um 17:54 hat ronnie sahlberg geschrieben:
> On Wed, Jul 17, 2013 at 3:25 AM, Kevin Wolf wrote:
> > Am 17.07.2013 um 11:58 hat Paolo Bonzini geschrieben:
> >> BTW, Peter and Ronnie: we were assuming that UNMAP with LBPRZ=1 always
> >> zeroes blocks, but is that true for unaligned oper
Am 17.07.2013 um 19:48 hat Peter Lieven geschrieben:
>
> Am 17.07.2013 um 19:04 schrieb Paolo Bonzini :
>
> > 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 st
Il 18/07/2013 11:23, Kevin Wolf ha scritto:
> Am 17.07.2013 um 19:48 hat Peter Lieven geschrieben:
>>
>> Am 17.07.2013 um 19:04 schrieb Paolo Bonzini :
>>
>>> 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
Am 18.07.2013 um 12:24 hat Paolo Bonzini geschrieben:
> Il 18/07/2013 11:23, Kevin Wolf ha scritto:
> > Am 17.07.2013 um 19:48 hat Peter Lieven geschrieben:
> >>
> >> Am 17.07.2013 um 19:04 schrieb Paolo Bonzini :
> >>
> >>> Il 17/07/2013 19:02, Peter Lieven ha scritto:
> For Disks we always u
On 18.07.2013 12:24, Paolo Bonzini wrote:
Il 18/07/2013 11:23, Kevin Wolf ha scritto:
Am 17.07.2013 um 19:48 hat Peter Lieven geschrieben:
Am 17.07.2013 um 19:04 schrieb Paolo Bonzini :
Il 17/07/2013 19:02, Peter Lieven ha scritto:
For Disks we always use read/write16 so i think we Should al
Il 18/07/2013 12:44, Peter Lieven ha scritto:
> On 18.07.2013 12:24, Paolo Bonzini wrote:
>> Il 18/07/2013 11:23, Kevin Wolf ha scritto:
>>> Am 17.07.2013 um 19:48 hat Peter Lieven geschrieben:
Am 17.07.2013 um 19:04 schrieb Paolo Bonzini :
> Il 17/07/2013 19:02, Peter Lieven ha scrit
On 18.07.2013 12:56, Paolo Bonzini wrote:
Il 18/07/2013 12:44, Peter Lieven ha scritto:
On 18.07.2013 12:24, Paolo Bonzini wrote:
Il 18/07/2013 11:23, Kevin Wolf ha scritto:
Am 17.07.2013 um 19:48 hat Peter Lieven geschrieben:
Am 17.07.2013 um 19:04 schrieb Paolo Bonzini :
Il 17/07/2013 19:
Il 18/07/2013 13:04, Peter Lieven ha scritto:
>> But if you set BDRV_DISCARD_WRITE_ZEROES, then you always need a
>> fallback to bdrv_write_zeroes. Why not just call bdrv_write_zeroes to
>> begin with? That's why extending bdrv_write_zeroes is preferable.
> In this case wo do not need a flag to t
On 18.07.2013 14:31, Paolo Bonzini wrote:
Il 18/07/2013 13:04, Peter Lieven ha scritto:
But if you set BDRV_DISCARD_WRITE_ZEROES, then you always need a
fallback to bdrv_write_zeroes. Why not just call bdrv_write_zeroes to
begin with? That's why extending bdrv_write_zeroes is preferable.
In t
Il 18/07/2013 15:29, Peter Lieven ha scritto:
>>> If the driver would have a better method of writing zeroes than
>>> discard it simply should not set bdi->write_zeroes_w_discard = 1.
>> If the driver had a better method of writing zeroes than discard, it
>> simply should ignore the BDRV_MAY_UNMAP
On Thu, Jul 18, 2013 at 6:29 AM, Peter Lieven wrote:
> On 18.07.2013 14:31, Paolo Bonzini wrote:
>>
>> Il 18/07/2013 13:04, Peter Lieven ha scritto:
But if you set BDRV_DISCARD_WRITE_ZEROES, then you always need a
fallback to bdrv_write_zeroes. Why not just call bdrv_write_zeroes t
On 18.07.2013 15:52, Paolo Bonzini wrote:
Il 18/07/2013 15:29, Peter Lieven ha scritto:
If the driver would have a better method of writing zeroes than
discard it simply should not set bdi->write_zeroes_w_discard = 1.
If the driver had a better method of writing zeroes than discard, it
simply s
Il 18/07/2013 15:55, ronnie sahlberg ha scritto:
>> > bdrv->write_zeroes will use writesame16 and set the unmap flag only if
>> > BDRV_MAY_DISCARD == 1 and BDRV_O_UNMAP == 1 and lbprz == 1.
> When you use WRITESAME16 you can ignore the lbprz flag.
> Just send a WRITESAME16 command with one block of
Il 18/07/2013 16:09, Peter Lieven ha scritto:
> On 18.07.2013 15:52, Paolo Bonzini wrote:
>> Il 18/07/2013 15:29, Peter Lieven ha scritto:
> If the driver would have a better method of writing zeroes than
> discard it simply should not set bdi->write_zeroes_w_discard = 1.
If the driver
On 18.07.2013 16:20, Paolo Bonzini wrote:
Il 18/07/2013 16:09, Peter Lieven ha scritto:
On 18.07.2013 15:52, Paolo Bonzini wrote:
Il 18/07/2013 15:29, Peter Lieven ha scritto:
If the driver would have a better method of writing zeroes than
discard it simply should not set bdi->write_zeroes_w_d
Il 18/07/2013 16:32, Peter Lieven ha scritto:
>>>
>> (Mis)alignment and granularity can be handled later. We can ignore them
>> for now. Later, if we decide the best way to support them is a flag,
>> we'll add it. Let's not put the cart before the horse.
>>
>> BTW, I expect alignment!=0 to be re
Am 18.07.2013 um 16:35 schrieb Paolo Bonzini :
> Il 18/07/2013 16:32, Peter Lieven ha scritto:
>>> (Mis)alignment and granularity can be handled later. We can ignore them
>>> for now. Later, if we decide the best way to support them is a flag,
>>> we'll add it. Let's not put the cart bef
BlockLimitsVPD OptimalUnmapGranularity also applies to unmapping with
writesame16 :
An OPTIMAL UNMAP GRANULARITY field set to a non-zero value indicates
the optimal granularity in logical blocks
for unmap requests (e.g., an UNMAP command or a WRITE SAME (16)
command with the UNMAP bit set to
one)
Am 18.07.2013 um 20:54 schrieb ronnie sahlberg :
> BlockLimitsVPD OptimalUnmapGranularity also applies to unmapping with
> writesame16 :
>
> An OPTIMAL UNMAP GRANULARITY field set to a non-zero value indicates
> the optimal granularity in logical blocks
> for unmap requests (e.g., an UNMAP comm
Il 18/07/2013 21:28, Peter Lieven ha scritto:
> thanks for the details. I think to have optimal performance and best
> change for unmapping in qemu-img convert
> it might be best to export the OPTIMAL UNMAP GRANULARITY
Agreed about this.
> as well as the write_zeroes_w_discard capability via the
On 19.07.2013 07:58, Paolo Bonzini wrote:
Il 18/07/2013 21:28, Peter Lieven ha scritto:
thanks for the details. I think to have optimal performance and best
change for unmapping in qemu-img convert
it might be best to export the OPTIMAL UNMAP GRANULARITY
Agreed about this.
as well as the writ
On Thu, Jul 18, 2013 at 11:08 PM, Peter Lieven wrote:
> On 19.07.2013 07:58, Paolo Bonzini wrote:
>>
>> Il 18/07/2013 21:28, Peter Lieven ha scritto:
>>>
>>> thanks for the details. I think to have optimal performance and best
>>> change for unmapping in qemu-img convert
>>> it might be best to ex
On 19.07.2013 15:25, ronnie sahlberg wrote:
On Thu, Jul 18, 2013 at 11:08 PM, Peter Lieven wrote:
On 19.07.2013 07:58, Paolo Bonzini wrote:
Il 18/07/2013 21:28, Peter Lieven ha scritto:
thanks for the details. I think to have optimal performance and best
change for unmapping in qemu-img conve
On Thu, Jul 18, 2013 at 11:43 AM, Peter Lieven wrote:
>
> Am 18.07.2013 um 16:35 schrieb Paolo Bonzini :
>
>> Il 18/07/2013 16:32, Peter Lieven ha scritto:
>
(Mis)alignment and granularity can be handled later. We can ignore them
for now. Later, if we decide the best way to support
On Fri, Jul 19, 2013 at 6:49 AM, Peter Lieven wrote:
> On 19.07.2013 15:25, ronnie sahlberg wrote:
>>
>> On Thu, Jul 18, 2013 at 11:08 PM, Peter Lieven wrote:
>>>
>>> On 19.07.2013 07:58, Paolo Bonzini wrote:
Il 18/07/2013 21:28, Peter Lieven ha scritto:
>
> thanks for the detai
On 19.07.2013 16:00, ronnie sahlberg wrote:
On Fri, Jul 19, 2013 at 6:49 AM, Peter Lieven wrote:
On 19.07.2013 15:25, ronnie sahlberg wrote:
On Thu, Jul 18, 2013 at 11:08 PM, Peter Lieven wrote:
On 19.07.2013 07:58, Paolo Bonzini wrote:
Il 18/07/2013 21:28, Peter Lieven ha scritto:
thanks
Am 15.07.2013 um 12:49 hat Peter Lieven geschrieben:
> if a destination has has_zero_init = 0, but it supports
> discard zeroes use discard to convert the target
> into an all zero device.
>
> Signed-off-by: Peter Lieven
Wouldn't it be better to use bdrv_write_zeroes() and extend the
implementat
50 matches
Mail list logo