[Top][All Lists]

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

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

From: Peter Lieven
Subject: Re: [Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert
Date: Wed, 17 Jul 2013 12:22:42 +0200

Am 17.07.2013 um 10:46 schrieb Kevin Wolf <address@hidden>:

> 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 <address@hidden>
> Wouldn't it be better to use bdrv_write_zeroes() and extend the
> implementation of that to use discard internally in those block drivers
> where it makes sense?
> Because here you're not really discarding (i.e. don't care about the
> sectors any more), but you want them to be zeroed.

It is just a fall back in case we can't decide if has_zero_init is 1 easily.
This general approach has the benefit that it is also good for any host device
that has discard zeroes.


reply via email to

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