diff options
author | Hanna Reitz | 2022-01-18 17:59:59 +0100 |
---|---|---|
committer | Eric Blake | 2022-01-28 23:52:40 +0100 |
commit | 113b727ce788335cf76f65355d670c9bc130fd75 (patch) | |
tree | f88a392bce62431f6bbe9415895132cc1a0783d9 /bsd-user/freebsd/os-sys.c | |
parent | qapi/block: Cosmetic change in BlockExportType schema (diff) | |
download | qemu-113b727ce788335cf76f65355d670c9bc130fd75.tar.gz qemu-113b727ce788335cf76f65355d670c9bc130fd75.tar.xz qemu-113b727ce788335cf76f65355d670c9bc130fd75.zip |
block/io: Update BSC only if want_zero is true
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 <nsoffer@redhat.com>
Fixes: 0bc329fbb00 ("block: block-status cache for data regions")
Reviewed-by: Nir Soffer <nsoffer@redhat.com>
Cc: qemu-stable@nongnu.org
Signed-off-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20220118170000.49423-2-hreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'bsd-user/freebsd/os-sys.c')
0 files changed, 0 insertions, 0 deletions