aboutsummaryrefslogtreecommitdiff
path: root/block.c
diff options
context:
space:
mode:
authorMax Reitz <mreitz@redhat.com>2019-06-12 17:10:46 +0200
committerKevin Wolf <kwolf@redhat.com>2020-09-07 12:31:30 +0200
commit34778172f1eb75796c8af9fae8d88b889cff4fd2 (patch)
tree28e37f265a7dc1bc35e7a74f5a86a43ab419b0b2 /block.c
parentd38d7eb8a5e78ecc1906e763f59356a0b26a8b53 (diff)
block: bdrv_cow_child() for bdrv_has_zero_init()
bdrv_has_zero_init() should use bdrv_cow_child() if it wants to check whether the given BDS has a COW backing file. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block.c')
-rw-r--r--block.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block.c b/block.c
index b162142609..656baa521e 100644
--- a/block.c
+++ b/block.c
@@ -5415,7 +5415,7 @@ int bdrv_has_zero_init(BlockDriverState *bs)
/* If BS is a copy on write image, it is initialized to
the contents of the base image, which may not be zeroes. */
- if (bs->backing) {
+ if (bdrv_cow_child(bs)) {
return 0;
}
if (bs->drv->bdrv_has_zero_init) {