From: Charlie Shepherd <charlie@ctshepherd.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: kwolf@redhat.com, stefanha@gmail.com, gabriel@kerneis.info,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 3/3] COW: Skip setting already set bits
Date: Wed, 06 Nov 2013 12:36:04 +0000 [thread overview]
Message-ID: <527A37B4.10202@ctshepherd.com> (raw)
In-Reply-To: <527A3631.4030500@redhat.com>
On 06/11/2013 12:29, Paolo Bonzini wrote:
> 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;
Good point, this is basically a poor man's for-loop. I'll turn it into a
for loop then continue will make sense here.
>> + }
>> + bitnum += set;
> Here you're adjusting bitnum but not nb_sectors and sector_bits.
Good catch.
Charlie
next prev parent reply other threads:[~2013-11-06 12:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-06 12:23 [Qemu-devel] [PATCH 0/3] COW: Speed up writes Charlie Shepherd
2013-11-06 12:23 ` [Qemu-devel] [PATCH 1/3] " Charlie Shepherd
2013-11-06 12:26 ` Paolo Bonzini
2013-11-06 12:23 ` [Qemu-devel] [PATCH 2/3] COW: Extend checking allocated bits to beyond one sector Charlie Shepherd
2013-11-06 12:32 ` Paolo Bonzini
2013-11-06 12:23 ` [Qemu-devel] [PATCH 3/3] COW: Skip setting already set bits Charlie Shepherd
2013-11-06 12:29 ` Paolo Bonzini
2013-11-06 12:36 ` Charlie Shepherd [this message]
2013-11-06 12:45 ` [Qemu-devel] [PATCH 0/3] COW: Speed up writes Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=527A37B4.10202@ctshepherd.com \
--to=charlie@ctshepherd.com \
--cc=gabriel@kerneis.info \
--cc=kwolf@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.