From: Eric Sandeen <sandeen@redhat.com>
To: dsterba@suse.cz, linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH V2] btrfs: move leak debug code to functions
Date: Mon, 22 Apr 2013 10:27:11 -0500 [thread overview]
Message-ID: <517556CF.9090405@redhat.com> (raw)
In-Reply-To: <20130422152203.GQ16427@twin.jikos.cz>
On 4/22/13 10:22 AM, David Sterba wrote:
> On Mon, Apr 22, 2013 at 12:18:37AM -0500, Eric Sandeen wrote:
>> There was a time when sprinkling #ifdefs around was
>> bad form. We can clean up the code a bit by moving
>> the leak-list adds/removes into functions and make things
>> more readable.
>>
>> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
>> ---
>>
>> V2: remove extra semicolons on no-op #defines,
>> thanks Roger!
>>
>> p.s. maybe _debug_ should be in the function names?
>> *shrug*
>
> I agree with that, makes things clear in the code, one does not need to
> look into that function.
>
> The leak_list members of extent_state and extent_buffer are present even
> without LEAK_DEBUG and are taking space, I'd like to see them moved
> under an #ifdef, but as the define is now local to the .c file this
> would need to add eg. a CONFIG_ option or a comment that describes how
> it should be used.
Yep I noticed that too, I'd be happy to elevate it to a CONFIG_ option if
it's really something that will be kept around for a while.
Could maybe be lumped in to a CONFIG_BTRFS_DEBUG that catches other
#define DEBUG behaviors as well?
-Eric
> Bug I'm fine with changing just the function names right now, the rest
> is optional and nice to have.
>
> Reviewed-by: David Sterba <dsterba@suse.cz>
>
next prev parent reply other threads:[~2013-04-22 15:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-21 6:32 [PATCH] btrfs: move leak debug code to functions Eric Sandeen
2013-04-22 4:09 ` Roger Binns
2013-04-22 5:18 ` [PATCH V2] " Eric Sandeen
2013-04-22 15:22 ` David Sterba
2013-04-22 15:27 ` Eric Sandeen [this message]
2013-04-22 15:36 ` David Sterba
2013-04-22 16:12 ` [PATCH V3] " Eric Sandeen
2013-04-23 17:05 ` David Sterba
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=517556CF.9090405@redhat.com \
--to=sandeen@redhat.com \
--cc=dsterba@suse.cz \
--cc=linux-btrfs@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox