Re: [PATCH V2] btrfs: move leak debug code to functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
>> ---
>>
>> 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@xxxxxxx>
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux