[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v4 03/21] cow: do not call bdrv_co_is_allocated
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PATCH v4 03/21] cow: do not call bdrv_co_is_allocated |
Date: |
Thu, 29 Aug 2013 16:00:03 +0200 |
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 <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
v3->v4: remove forward declaration
block/cow.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/cow.c b/block/cow.c
index 9ae2d6a..55bac50 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);
--
1.8.3.1
- [Qemu-devel] [PATCH v4 00/21] Add qemu-img subcommand to dump file metadata, Paolo Bonzini, 2013/08/29
- [Qemu-devel] [PATCH v4 01/21] cow: make reads go at a decent speed, Paolo Bonzini, 2013/08/29
- [Qemu-devel] [PATCH v4 02/21] cow: make writes go at a less indecent speed, Paolo Bonzini, 2013/08/29
- [Qemu-devel] [PATCH v4 03/21] cow: do not call bdrv_co_is_allocated,
Paolo Bonzini <=
- [Qemu-devel] [PATCH v4 04/21] block: keep bs->total_sectors up to date even for growable block devices, Paolo Bonzini, 2013/08/29
- [Qemu-devel] [PATCH v4 05/21] block: make bdrv_co_is_allocated static, Paolo Bonzini, 2013/08/29
- [Qemu-devel] [PATCH v4 08/21] block: expect errors from bdrv_co_is_allocated, Paolo Bonzini, 2013/08/29
- [Qemu-devel] [PATCH v4 06/21] block: do not use ->total_sectors in bdrv_co_is_allocated, Paolo Bonzini, 2013/08/29
- [Qemu-devel] [PATCH v4 07/21] block: remove bdrv_is_allocated_above/bdrv_co_is_allocated_above distinction, Paolo Bonzini, 2013/08/29