From: Paolo Bonzini <pbonzini@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] qcow2: Simplify calculation for COW area at the end
Date: Tue, 12 Jun 2012 16:39:11 +0200 [thread overview]
Message-ID: <4FD7548F.80301@redhat.com> (raw)
In-Reply-To: <4FD75430.3090902@redhat.com>
Il 12/06/2012 16:37, Kevin Wolf ha scritto:
>> > align_offset(m->nb_available+1, s->cluster_sectors)
> Heh, yes, you're thinking about equivalence of the very formula (which
> is what I would do in unknown code as well), whereas I think about a COW
> operation that ranges from a given sector to the end of the same cluster
> (and not the next one).
>
> It's eventually the same, because this statement is only executed when
> it's not aligned (i.e. the COW range isn't empty):
>
> if (m->nb_available & (s->cluster_sectors - 1)) {
> ...
> }
Indeed, your version is ok.
Paolo
prev parent reply other threads:[~2012-06-12 14:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-12 13:47 [Qemu-devel] [PATCH] qcow2: Simplify calculation for COW area at the end Kevin Wolf
2012-06-12 14:00 ` Paolo Bonzini
2012-06-12 14:21 ` Kevin Wolf
2012-06-12 14:31 ` Paolo Bonzini
2012-06-12 14:37 ` Kevin Wolf
2012-06-12 14:39 ` Paolo Bonzini [this message]
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=4FD7548F.80301@redhat.com \
--to=pbonzini@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
/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.