On Tue, Jan 18, 2022 at 05:59:59PM +0100, Hanna Reitz wrote: > We update the block-status cache whenever we get new information from a > bdrv_co_block_status() call to the block driver. However, if we have > passed want_zero=false to that call, it may flag areas containing zeroes > as data, and so we would update the block-status cache with wrong > information. > > Therefore, we should not update the cache with want_zero=false. > > Reported-by: Nir Soffer <[email protected]> > Fixes: 0bc329fbb00 ("block: block-status cache for data regions") > Reviewed-by: Nir Soffer <[email protected]> > Cc: [email protected] > Signed-off-by: Hanna Reitz <[email protected]> > --- > block/io.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-)
Reviewed-by: Eric Blake <[email protected]> -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
