diff options
author | Kevin Wolf <kwolf@redhat.com> | 2015-06-17 14:55:21 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2015-10-16 15:34:29 +0200 |
commit | 760e006384ecd5b8b8b1b91b5c85ff8fdcb3a21f (patch) | |
tree | 506ef3c27944a2f97069327493f875a2def3d90a /block/qcow2-cluster.c | |
parent | b26e90f56ad3a494ee6337d2075f4dc55b62b3c6 (diff) | |
download | qemu-760e006384ecd5b8b8b1b91b5c85ff8fdcb3a21f.tar.gz qemu-760e006384ecd5b8b8b1b91b5c85ff8fdcb3a21f.tar.bz2 qemu-760e006384ecd5b8b8b1b91b5c85ff8fdcb3a21f.zip |
block: Convert bs->backing_hd to BdrvChild
This is the final step in converting all of the BlockDriverState
pointers that block drivers use to BdrvChild.
After this patch, bs->children contains the full list of child nodes
that are referenced by a given BDS, and these children are only
referenced through BdrvChild, so that updating the pointer in there is
enough for changing edges in the graph.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Alberto Garcia <berto@igalia.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'block/qcow2-cluster.c')
-rw-r--r-- | block/qcow2-cluster.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c index a2f3efc2e3..67be0ce2c9 100644 --- a/block/qcow2-cluster.c +++ b/block/qcow2-cluster.c @@ -1473,7 +1473,7 @@ static int discard_single_l2(BlockDriverState *bs, uint64_t offset, */ switch (qcow2_get_cluster_type(old_l2_entry)) { case QCOW2_CLUSTER_UNALLOCATED: - if (full_discard || !bs->backing_hd) { + if (full_discard || !bs->backing) { continue; } break; @@ -1707,7 +1707,7 @@ static int expand_zero_clusters_in_l1(BlockDriverState *bs, uint64_t *l1_table, } if (!preallocated) { - if (!bs->backing_hd) { + if (!bs->backing) { /* not backed; therefore we can simply deallocate the * cluster */ l2_table[j] = 0; |