mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
block: Fix bdrv_has_zero_init
Assuming that any image on a block device is not properly zero-initialized is actually wrong: Only raw images have this problem. Any other image format shouldn't care about it, they initialize everything properly themselves. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
bd0858bb46
commit
336c1c1255
5 changed files with 28 additions and 10 deletions
6
block.c
6
block.c
|
@ -1477,10 +1477,8 @@ int bdrv_has_zero_init(BlockDriverState *bs)
|
|||
{
|
||||
assert(bs->drv);
|
||||
|
||||
if (bs->drv->no_zero_init) {
|
||||
return 0;
|
||||
} else if (bs->file) {
|
||||
return bdrv_has_zero_init(bs->file);
|
||||
if (bs->drv->bdrv_has_zero_init) {
|
||||
return bs->drv->bdrv_has_zero_init(bs);
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue