[Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert

2013-07-15 Thread Peter Lieven
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

Re: [Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert

2013-09-12 Thread Peter Lieven
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

Re: [Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert

2013-09-12 Thread Paolo Bonzini
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

Re: [Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert

2013-09-12 Thread Peter Lieven
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

Re: [Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert

2013-07-17 Thread 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. >> >> Signed-off-by: Peter Lieven > > Wouldn't it be better

Re: [Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert

2013-07-17 Thread Peter Lieven
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. >>> >

Re: [Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert

2013-07-17 Thread Peter Lieven
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

Re: [Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert

2013-07-17 Thread Kevin Wolf
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

Re: [Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert

2013-07-17 Thread 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_zero_init = 0, but it supports > >>> discard zeroes us

Re: [Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert

2013-07-17 Thread Peter Lieven
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

Re: [Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert

2013-07-17 Thread 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 the command will > fail with > a check condition if i

Re: [Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert

2013-07-17 Thread 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 Peter Lieven geschrieben: > if a destination has has_zero_in

Re: [Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert

2013-07-17 Thread Peter Lieven
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

Re: [Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert

2013-07-17 Thread Peter Lieven
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

Re: [Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert

2013-07-17 Thread Paolo Bonzini
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

Re: [Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert

2013-07-17 Thread ronnie sahlberg
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

Re: [Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert

2013-07-17 Thread Paolo Bonzini
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

Re: [Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert

2013-07-17 Thread 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 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

Re: [Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert

2013-07-17 Thread Peter Lieven
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

Re: [Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert

2013-07-17 Thread 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. Paolo > Von meinem iPhone gesendet > > Am 17.07.2013 um 18:31 schrieb ronnie sahlberg : > >> On Wed, Jul

Re: [Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert

2013-07-17 Thread ronnie sahlberg
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

Re: [Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert

2013-07-17 Thread Peter Lieven
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

Re: [Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert

2013-07-17 Thread Paolo Bonzini
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

Re: [Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert

2013-07-18 Thread Kevin Wolf
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

Re: [Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert

2013-07-18 Thread Kevin Wolf
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

Re: [Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert

2013-07-18 Thread Paolo Bonzini
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

Re: [Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert

2013-07-18 Thread Kevin Wolf
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

Re: [Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert

2013-07-18 Thread Peter Lieven
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

Re: [Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert

2013-07-18 Thread Paolo Bonzini
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

Re: [Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert

2013-07-18 Thread Peter Lieven
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:

Re: [Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert

2013-07-18 Thread Paolo Bonzini
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

Re: [Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert

2013-07-18 Thread Peter Lieven
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

Re: [Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert

2013-07-18 Thread Paolo Bonzini
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

Re: [Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert

2013-07-18 Thread ronnie sahlberg
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

Re: [Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert

2013-07-18 Thread Peter Lieven
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

Re: [Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert

2013-07-18 Thread Paolo Bonzini
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

Re: [Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert

2013-07-18 Thread Paolo Bonzini
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

Re: [Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert

2013-07-18 Thread Peter Lieven
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

Re: [Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert

2013-07-18 Thread 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 before the horse. >> >> BTW, I expect alignment!=0 to be re

Re: [Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert

2013-07-18 Thread Peter Lieven
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

Re: [Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert

2013-07-18 Thread 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 command or a WRITE SAME (16) command with the UNMAP bit set to one)

Re: [Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert

2013-07-18 Thread Peter Lieven
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

Re: [Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert

2013-07-18 Thread Paolo Bonzini
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

Re: [Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert

2013-07-18 Thread Peter Lieven
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

Re: [Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert

2013-07-19 Thread ronnie sahlberg
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

Re: [Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert

2013-07-19 Thread Peter Lieven
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

Re: [Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert

2013-07-19 Thread ronnie sahlberg
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

Re: [Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert

2013-07-19 Thread ronnie sahlberg
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

Re: [Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert

2013-07-19 Thread Peter Lieven
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

Re: [Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert

2013-07-17 Thread 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 better to use bdrv_write_zeroes() and extend the implementat