[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 01/17] cow: make reads go at a decent speed
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH 01/17] cow: make reads go at a decent speed |
Date: |
Fri, 5 Jul 2013 11:09:10 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Wed, Jul 03, 2013 at 04:34:15PM +0200, Paolo Bonzini wrote:
> @@ -146,23 +159,20 @@ static inline int is_bit_set(BlockDriverState *bs,
> int64_t bitnum)
> static int coroutine_fn cow_co_is_allocated(BlockDriverState *bs,
> int64_t sector_num, int nb_sectors, int *num_same)
> {
> + int64_t bitnum = sector_num + sizeof(struct cow_header_v2) * 8;
> + uint64_t offset = (bitnum / 8) & -BDRV_SECTOR_SIZE;
> + uint8_t bitmap[512];
Please use BDRV_SECTOR_SIZE, you used it one line above but then
switched to literal 512.
- [Qemu-devel] [PATCH 00/17] Add qemu-img subcommand to dump file metadata, Paolo Bonzini, 2013/07/03
- [Qemu-devel] [PATCH 01/17] cow: make reads go at a decent speed, Paolo Bonzini, 2013/07/03
- [Qemu-devel] [PATCH 02/17] cow: make writes go at a less indecent speed, Paolo Bonzini, 2013/07/03
- [Qemu-devel] [PATCH 03/17] cow: do not call bdrv_co_is_allocated, Paolo Bonzini, 2013/07/03
- [Qemu-devel] [PATCH 04/17] block: make bdrv_co_is_allocated static, Paolo Bonzini, 2013/07/03
- [Qemu-devel] [PATCH 05/17] block: remove bdrv_is_allocated_above/bdrv_co_is_allocated_above distinction, Paolo Bonzini, 2013/07/03
- [Qemu-devel] [PATCH 07/17] qemu-img: always probe the input image for allocated sectors, Paolo Bonzini, 2013/07/03
- [Qemu-devel] [PATCH 06/17] block: expect errors from bdrv_co_is_allocated, Paolo Bonzini, 2013/07/03