qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC PATCH] block: optimize zero writes with bdrv_write


From: Kevin Wolf
Subject: Re: [Qemu-devel] [RFC PATCH] block: optimize zero writes with bdrv_write_zeroes
Date: Mon, 24 Feb 2014 13:07:12 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

Am 24.02.2014 um 12:51 hat Paolo Bonzini geschrieben:
> Il 24/02/2014 12:33, Fam Zheng ha scritto:
> >> This is (or should be) bdrv_co_write_zeroes without BDRV_REQ_MAY_UNMAP.
> >
> >But IIUC bdrv_co_write_zeroes without BDRV_REQ_MAY_UNMAP doesn't require
> >cluster allocation if it's allocated yet, which is a bit different.
> 
> Yeah, that's why I wrote "or should be".  Those are the intended
> semantics of bdrv_co_write_zeroes without BDRV_REQ_MAY_UNMAP: always
> allocate a cluster that will read as zeroes (allocating even if it
> does not necessarily write the zeroes).

Which would mean that there is no way to say "give me zeroes, and do it
in the cheapest way possible". Because that would be to leave the
allocation status as it is and just toggle the zero bit.

> For legacy reasons it may not be exactly what is implemented.  I
> asked Kevin a couple of weeks ago and he sent a patch, but even he
> wasn't sure of what qcow2 was doing util he looked at the code. :)

Even with my patch, it doesn't actually allocate the cluster, it just
sets the flag.

Kevin



reply via email to

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