mirror of
https://github.com/qemu/qemu.git
synced 2025-08-10 12:46:22 +00:00
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>
This commit is contained in:
parent
d38d7eb8a5
commit
34778172f1
2
block.c
2
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
|
/* If BS is a copy on write image, it is initialized to
|
||||||
the contents of the base image, which may not be zeroes. */
|
the contents of the base image, which may not be zeroes. */
|
||||||
if (bs->backing) {
|
if (bdrv_cow_child(bs)) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (bs->drv->bdrv_has_zero_init) {
|
if (bs->drv->bdrv_has_zero_init) {
|
||||||
|
Loading…
Reference in New Issue
Block a user