From: Dave Chinner <david@fromorbit.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Alex Elder <aelder@sgi.com>,
linux-kernel@vger.kernel.org, xfs@oss.sgi.com,
akpm@linux-foundation.org
Subject: Re: [GIT PULL] XFS update for 3.1-rc4
Date: Wed, 24 Aug 2011 17:42:40 +1000 [thread overview]
Message-ID: <20110824074240.GH3162@dastard> (raw)
In-Reply-To: <CA+55aFwJAPN=EgTo-2iarhe4cFSArqB6AZAHDsuEK5EPBZVn+A@mail.gmail.com>
On Tue, Aug 23, 2011 at 05:59:46PM -0700, Linus Torvalds wrote:
> On Tue, Aug 23, 2011 at 5:42 PM, Dave Chinner <david@fromorbit.com> wrote:
> >
> > I consider the context it adds to cscope searches a damn good reason
> > for keeping it.
>
> Umm. I suggest you start learning to use the tools you have, rather
> than blame your inability to use them for then making crap decisions
> in file naming.
If you're passing judgement on the XFS filenaming convention, then
don't blame me - way before my time. e.g. the two initial XFS
commits from 29 October, 1993 show exactly the same names as we
currently use:
http://oss.sgi.com/cgi-bin/gitweb.cgi?p=archive/xfs-import.git;a=commitdiff;h=67e682e44dd02a2a0efaa0ed2579894325010a85
http://oss.sgi.com/cgi-bin/gitweb.cgi?p=archive/xfs-import.git;a=commitdiff;h=ec2b385b4b79e3967e1e0480fb1863ba029f6c30
So perhaps you might want to go hunt down the original XFS
developers. They'd probably just laugh at you, though.
Regardless, changing the filenames now is a bad idea. Plenty of
people are familiar with what they mean and what they contain, and
changing them just means everyone has to relearn where stuff is. We
lose the simple solution to the question "what file does that
function exist in" and deciding where to put new code becomes harder
because it's not as clear what the overall scope of each file is
supposed to be. It will also make code archeology during bug triage
harder as well. That doesn't improve anything for anyone in the
short term - it will only slow us down.
And in the long term, a major rename makes things like backports to
stable kernels harder, more time consuming and more error prone due
to the extra transformations that need to take place for each patch.
That's two strikes.
Then there is also the userspace tools that share a bunch of the
kernel code that we have to keep in sync. Hence renaming the kernel
files means we'll make a bunch of work for ourselves in userspace as
well to keep that in sync. Strike Three.
So really, I can't see any good reason to change the XFS file names.
> Read up on the "-pN" thing to cscope.
I learnt about that in 2002.
However, if you ever used cscope with the -pN option on a source
tree with long verbose filenames (like you suggest) and functions on
a 80-90 column terminal, you'd understand that these shift the code
context output (the most important bit of the cscope output) so far
across the terminal that it line wraps 3 or 4 times and is
completely unreadable.....
> So here's a trick of the day:
>
> export CSCOPEOPTIONS=-p2
>
> or something like that.
Sure. You need to wrap it in an alias because cscope doesn't have a
magic environment variable or config file to set default options.
Of course, the obvious logical extension of that is to then hook up
a script to PROMPT_COMMAND or aliasing cd/pushd/popd (or cwdcmd for
tcsh) so that $CSCOPEOPTIONS changes automatically depending on the
source tree you are currently working in.
That would require learning a bit about the tools you use every day,
though. I learnt this trick in 2003..... :P
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
prev parent reply other threads:[~2011-08-24 7:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-23 17:39 [GIT PULL] XFS update for 3.1-rc4 Alex Elder
2011-08-23 18:46 ` Linus Torvalds
2011-08-23 19:57 ` Alex Elder
2011-08-24 0:42 ` Dave Chinner
2011-08-24 0:59 ` Linus Torvalds
2011-08-24 7:42 ` Dave Chinner [this message]
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=20110824074240.GH3162@dastard \
--to=david@fromorbit.com \
--cc=aelder@sgi.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=xfs@oss.sgi.com \
/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