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,
On Fri, Jan 28, 2011 at 9:57 AM, Stefan Hajnoczi stefa...@gmail.com 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
+ *
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 kw...@redhat.com
---
block/qcow2-cluster.c | 78