diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2013-09-04 19:00:20 +0200 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2013-09-06 15:25:08 +0200 |
commit | e641c1e81e54fc14908ff6785ef7d51e42c2e1bb (patch) | |
tree | 4f2f526c2a0b502b391953078d0e1232f732f424 | |
parent | 26ae980492920e417bc91761cc85950f18e41f85 (diff) | |
download | hqemu-e641c1e81e54fc14908ff6785ef7d51e42c2e1bb.zip hqemu-e641c1e81e54fc14908ff6785ef7d51e42c2e1bb.tar.gz |
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 <eblake@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
-rw-r--r-- | block/cow.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/cow.c b/block/cow.c index cd889e6..f4eca10 100644 --- a/block/cow.c +++ b/block/cow.c @@ -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); |