From: "Jörn Engel" <joern@wohnheim.fh-wedel.de>
To: David Woodhouse <dwmw2@infradead.org>
Cc: linux-mtd@lists.infradead.org
Subject: Re: jffs2 simplifications
Date: Mon, 10 Jan 2005 16:58:38 +0100 [thread overview]
Message-ID: <20050110155838.GE12520@wohnheim.fh-wedel.de> (raw)
In-Reply-To: <1105369990.5698.95.camel@hades.cambridge.redhat.com>
On Mon, 10 January 2005 15:13:10 +0000, David Woodhouse wrote:
> On Mon, 2005-01-10 at 15:51 +0100, Jörn Engel wrote:
> > Exactly. Anything other than functional code makes it hard to read
> > and even harder to change. So the chances of introducing bugs are
> > much higher. In a way, the debug code is needed because of the debug
> > code itself.
> >
> > Sure, it also serves a real purpose and not having any debug code
> > requires programmers that don't cause bugs. So it is a necessary
> > evil. The real art is to get by with as little debug code as
> > possible, yet have enough data to easily find any problems.
>
> I don't really see how printks make the code harder to read. You can
> probably convince your editor to hide them from you automatically if
> they really offend you.
if (foo)
printk();
else
functional code;
vs.
if (!foo)
functional code;
No editor I've ever seen can do the above. There were quite a few
cases like this.
> I prefer to optimise for the common case -- which is the _user_ not the
> developer. The level of verbosity if you enable CONFIG_JFFS2_FS_DEBUG is
> high, but it means that I can take a log from a clueless end-user and
> see precisely what's going on. I can look at a log from someone who's
> having problems, see precisely what's happening, and provide a patch in
> reply. While there are certainly some printks which can go, and even
> more could be demoted to level 2 from level 1 (which is all that's ever
> really useful), I wouldn't want to see it completely stripped of
> debugging output. Not unless you want to take over the task of
> supporting users ;)
Agreed. Right now _I_ need them removed to understand what the code
does and change it where it doesn't look that good. In most code I
took ownership for, most output (not all) was permanently removed.
Jffs2 doesn't fall into that category, though.
Basically, I expect to work in three steps:
1. Remove all output and change the code where necessary. Should
compile, that's all. Will surely introduce new bugs.
2. Start from mainline again and redo those changes that actually make
a difference. scan.c is a candidate. Make it work on my machine.
3. Send you patches. If my new version of scan.c doesn't have any
output anymore, you'll surely complain and want some back. Find some
sort of agreement.
So in the end, I won't even touch most files. I might bitch about the
verbosity here and there. Without the bitching, I wouldn't be able to
make radical changes, so it is necessary. Losing friends over the
bitching is definitely not wanted, but may be a side-effect. Hope you
can take some of it.
Really, jffs2 is something that may warrant a software patent - if
anything is. Log-structured file systems are long-known and have some
issues. The idea to split the fs into chunks and do the
log-structured thing per chunk is the stroke of a genius. Most of the
implementation is extremely nice as well, better than what I could
have done for sure.
But I focus on the bad parts that need work, so most comments from me
will be negative. Please don't take it the wrong way.
Jörn
--
Mundie uses a textbook tactic of manipulation: start with some
reasonable talk, and lead the audience to an unreasonable conclusion.
-- Bruce Perens
next prev parent reply other threads:[~2005-01-10 15:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-08 21:18 jffs2 simplifications Jörn Engel
2005-01-08 21:21 ` David Woodhouse
2005-01-10 14:29 ` Jörn Engel
2005-01-09 12:03 ` Artem B. Bityuckiy
2005-01-10 14:51 ` Jörn Engel
2005-01-10 15:13 ` David Woodhouse
2005-01-10 15:58 ` Jörn Engel [this message]
2005-01-11 12:29 ` Artem B. Bityuckiy
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=20050110155838.GE12520@wohnheim.fh-wedel.de \
--to=joern@wohnheim.fh-wedel.de \
--cc=dwmw2@infradead.org \
--cc=linux-mtd@lists.infradead.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