|
From: | Paolo Bonzini |
Subject: | Re: [Qemu-devel] [RFC PATCH] block: optimize zero writes with bdrv_write_zeroes |
Date: | Mon, 24 Feb 2014 12:51:24 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 |
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).
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. :)
Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |