Am 19.01.2010 12:35, schrieb Christoph Hellwig:
@@ -715,6 +721,7 @@ uint64_t qcow2_alloc_cluster_offset(BlockDriverState *bs,
cluster_offset = ~QCOW_OFLAG_COPIED;
m-nb_clusters = 0;
+m-depends_on = NULL;
What does this have to do with the rest?
It's needed to
On Tue, Jan 19, 2010 at 12:57:35PM +0100, Kevin Wolf wrote:
It's needed to be able to distinguish between the case where the
clusters are already allocated (0/NULL) and the case where the request
depends on another one (0/non-NULL). This check previously used the
return value (cluster_offset
@@ -715,6 +721,7 @@ uint64_t qcow2_alloc_cluster_offset(BlockDriverState *bs,
cluster_offset = ~QCOW_OFLAG_COPIED;
m-nb_clusters = 0;
+m-depends_on = NULL;
What does this have to do with the rest?
Otherwise looks good,
Reviewed-by: Christoph Hellwig h...@lst.de
Returning 0/-errno allows it to distingush different errors classes. The
cluster offset of newly allocated clusters is now returned in the QCowL2Meta
struct.
Signed-off-by: Kevin Wolf kw...@redhat.com
---
block/qcow2-cluster.c | 28 ++--
block/qcow2.c | 36