On Fri, Jan 28, 2011 at 9:57 AM, Stefan Hajnoczi wrote:
> On Thu, Jan 27, 2011 at 01:40:21PM +0100, Kevin Wolf wrote:
>> +/*
>> + * This discards as many clusters of nb_clusters as possible at once (i.e.
>> + * all clusters in the same L2 table) and returns the number of discarded
>> + * clusters.
On Thu, Jan 27, 2011 at 01:40:21PM +0100, Kevin Wolf wrote:
> +/*
> + * This discards as many clusters of nb_clusters as possible at once (i.e.
> + * all clusters in the same L2 table) and returns the number of discarded
> + * clusters.
> + */
> +static int discard_single_l2(BlockDriverState *bs, u
This adds a bdrv_discard function to qcow2 that frees the discarded clusters.
It does not yet pass the discard on to the underlying file system driver, but
the space can be reused by future writes to the image.
Signed-off-by: Kevin Wolf
---
block/qcow2-cluster.c | 78 ++