From: Kevin Wolf <kwolf@redhat.com>
To: Nathan Froyd <froydnj@codesourcery.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] qcow2: Cache refcount blocks during snapshot creation
Date: Sat, 27 Jun 2009 11:01:41 +0200 [thread overview]
Message-ID: <4A45DFF5.6080909@redhat.com> (raw)
In-Reply-To: <20090626184806.GE1119@codesourcery.com>
Nathan Froyd schrieb:
> On Fri, Jun 26, 2009 at 08:19:38PM +0200, Kevin Wolf wrote:
>> + if (s->refcount_block_cache_offset == 0) {
>> + return 0;
>> + }
>> +
>> + if (bdrv_pwrite(s->hd, s->refcount_block_cache_offset,
>> + s->refcount_block_cache, size) != size)
>> + {
>
> Nit: bad formatting for opening brace here.
Oh, I like nitpicking. The coding style says: "The opening brace is on
the line that contains the control flow statement that introduces the
new block". No way to conform here without breaking the 80 characters
limit, so I did what I think is most reasonable. ;-)
I guess you mean something like the following:
if (bdrv_pwrite(s->hd, s->refcount_block_cache_offset,
s->refcount_block_cache, size) != size) {
do_it();
}
I don't like this very much because you can't see from the indentation
where the condition ends and the "then" branch begins (which is
different from a single-line condition). Maybe something to clarify in
the coding style and I'll happily follow it then.
Kevin
next prev parent reply other threads:[~2009-06-27 9:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-26 18:19 [Qemu-devel] [PATCH] qcow2: Cache refcount blocks during snapshot creation Kevin Wolf
2009-06-26 18:48 ` Nathan Froyd
2009-06-27 9:01 ` Kevin Wolf [this message]
2009-06-27 11:21 ` Stefan Weil
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=4A45DFF5.6080909@redhat.com \
--to=kwolf@redhat.com \
--cc=froydnj@codesourcery.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.