[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 3/3] COW: Skip setting already set bits
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 3/3] COW: Skip setting already set bits |
Date: |
Wed, 06 Nov 2013 13:29:37 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130923 Thunderbird/17.0.9 |
Il 06/11/2013 13:23, Charlie Shepherd ha scritto:
> + set = cow_find_streak(bitmap, 1, bitnum, sector_bits);
> + if (set == sector_bits) {
> + continue;
I think this shouldn't be a continue; these lines should be executed:
bitnum += sector_bits;
nb_sectors -= sector_bits;
offset += BDRV_SECTOR_SIZE;
> + }
> + bitnum += set;
Here you're adjusting bitnum but not nb_sectors and sector_bits.
Paolo