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 /qemu-img.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 'qemu-img.c')
-rw-r--r-- | qemu-img.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/qemu-img.c b/qemu-img.c index 7d65c0a78c..e678fdc403 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -748,7 +748,7 @@ static int img_commit(int argc, char **argv) /* This is different from QMP, which by default uses the deepest file in * the backing chain (i.e., the very base); however, the traditional * behavior of qemu-img commit is using the immediate backing file. */ - base_bs = bs->backing_hd; + base_bs = backing_bs(bs); if (!base_bs) { error_setg(&local_err, "Image does not have a backing file"); goto done; @@ -2207,7 +2207,7 @@ static int get_block_status(BlockDriverState *bs, int64_t sector_num, if (ret & (BDRV_BLOCK_ZERO|BDRV_BLOCK_DATA)) { break; } - bs = bs->backing_hd; + bs = backing_bs(bs); if (bs == NULL) { ret = 0; break; |