Re: [PATCH v2] ext4: Enable code path when DX_DEBUG is set
From: Theodore Ts'o
Date: Mon Feb 01 2021 - 12:00:00 EST
On Mon, Feb 01, 2021 at 12:49:24PM +0000, Christoph Hellwig wrote:
> DX_DEBUG is completely dead code, so either kill it off or make it an
> actual CONFIG_* symbol through Kconfig if it seems useful.
I wouldn't call it completely dead code. If you manually add "#define
DX_DEBUG" fs/ext4/namei.c compiles without any problems. I believe it
was most recently used when we added large htree support.
It's true that it can only be enabled via manually enabled via manual
editing of the .c file, but it's *really* something that only
developers who are actively involved in modifying the code would want
to use. Sure, we could add work to add debug levels to all of the
dxtrace() statements, and/or switch it all to dyndebug. We'd also
have to figure out how to get rid of all of the KERN_CONT printk's in
the ideal world. The question is whether doing all of this is
worth it if the goal is to shut up some clang warnings.
- Ted