mirror of
https://github.com/utmapp/qemu.git
synced 2026-12-01 22:23:23 -10:00
cow: do not call bdrv_co_is_allocated
As we change bdrv_is_allocated to gather more information from bs and bs->file, it will become a bit slower. It is still appropriate for online jobs, but not for reads/writes. Call the internal function instead. Reviewed-by: Eric Blake <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]> Signed-off-by: Stefan Hajnoczi <[email protected]>
This commit is contained in:
1 parent
26ae980492
commit
e641c1e81e
1 file changed
+1
-1
+1
-1
@@ -212,7 +212,7 @@ static int coroutine_fn cow_read(BlockDriverState *bs, int64_t sector_num,
|
||||
int ret, n;
|
||||
|
||||
while (nb_sectors > 0) {
|
||||
if (bdrv_co_is_allocated(bs, sector_num, nb_sectors, &n)) {
|
||||
if (cow_co_is_allocated(bs, sector_num, nb_sectors, &n)) {
|
||||
ret = bdrv_pread(bs->file,
|
||||
s->cow_sectors_offset + sector_num * 512,
|
||||
buf, n * 512);
|
||||
|
||||
Reference in new issue
Block a user