Re: ReiserFS / 2.4.6 / Data Corruption

Chris Wedgwood (cw@f00f.org)
Wed, 1 Aug 2001 03:15:54 +1200


On Tue, Jul 31, 2001 at 09:41:25AM -0400, Chris Mason wrote:

if (some_error) {
#ifdef CONFIG_REISERFS_CHECK
panic("some_error") ;
#else
gracefully_recover
#endif

What a terrible construct... if would be much more elegant as:

if(some_error) {
_namesys_internal_foo("some_error");
recover_bar();
}

where _namesys_internal_foo is compiled differently and may not return
depending on CONFIG_REISERFS_CHECK and maybe also the error type.

That way we don't end up with even more #ifdef BLAH / #endif cruft
which obfuscates what is already hard to read code in places!

Flames welcome :)

--cw

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/