On Tue, Aug 23, 2011 at 11:46:30AM -0700, Linus Torvalds wrote:
> On Tue, Aug 23, 2011 at 10:39 AM, Alex Elder <aelder@xxxxxxx> wrote:
> > Linus, please pull the following XFS changes. Their effect is to
> > remove the subdirectory structure from the XFS source hierarchy.
> > There are no functional changes to the XFS code itself. Thanks.
> Any plans to further sanitize the namespace?
> It's kind of crazy to have filenames like
> which just duplicate the "xfs" part for no good reason.
I consider the context it adds to cscope searches a damn good reason
for keeping it.
> Why not just
> do something like
> for i in xfs_*; do j=$(echo $i | sed 's/^xfs_//'); git mv $i $j; done
> to get rid of the silly "xfs_" prefix that adds nothing?
Because that then kills context that is actually useful in cscope
searches. That is, every filesystem has the file "inode.c",
"super.c", etc and so you can't tell from the cscope searchs which
filesystem function calls belong to.
Duplicate name spaces are evil, and we have a lot of them in the
filesystem tree - if they all had explicit namespacing like XFS
does, then the world would be a better place. ;)
> You could use the bytes you save to rename "qm.c" to "quota_manager.c"
> instead. Wouldn't it be nice to have *good* names, instead of a jumble
> of crazy and mostly redundant letters?
The names make sense to anyone who has spent any time in the XFS
code. The name of the file reflects the namespace of the code inside
the file itself. e.g. to use the xfs_qm.c as an example:
$ grep ^xfs_qm_ fs/xfs/xfs_qm.c
So there is a certain methodic sanity to the naming convention that
is not immediately obvious from just looking at the file names, and
that's a good reason not to change them.
Besides, I don't want to have to spend 3 months reprogramming
my muscle memory just because we painted the bikeshed a different