[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] qcow2: Cache refcount blocks during snapshot cr
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-devel] [PATCH] qcow2: Cache refcount blocks during snapshot creation |
Date: |
Sat, 27 Jun 2009 11:01:41 +0200 |
User-agent: |
Thunderbird 2.0.0.21 (X11/20090320) |
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