[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110824004206.GG3162@dastard>
Date: Wed, 24 Aug 2011 10:42:06 +1000
From: Dave Chinner <david@...morbit.com>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Alex Elder <aelder@....com>, linux-kernel@...r.kernel.org,
xfs@....sgi.com, akpm@...ux-foundation.org
Subject: Re: [GIT PULL] XFS update for 3.1-rc4
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@....com> 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.
>
> Pulled.
>
> Any plans to further sanitize the namespace?
>
> It's kind of crazy to have filenames like
>
> fs/xfs/xfs_trace.c
>
> 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
xfs_qm_destroy(
xfs_qm_hold_quotafs_ref(
xfs_qm_rele_quotafs_ref(
xfs_qm_unmount(
xfs_qm_mount_quotas(
xfs_qm_unmount_quotas(
xfs_qm_dqflush_all(
xfs_qm_detach_gdquots(
xfs_qm_dqpurge_int(
xfs_qm_dqpurge_all(
xfs_qm_dqattach_one(
xfs_qm_dqattach_grouphint(
xfs_qm_dqattach_locked(
xfs_qm_dqattach(
xfs_qm_dqdetach(
xfs_qm_sync(
xfs_qm_init_quotainfo(
xfs_qm_destroy_quotainfo(
xfs_qm_list_init(
xfs_qm_list_destroy(
xfs_qm_qino_alloc(
xfs_qm_reset_dqcounts(
xfs_qm_dqiter_bufs(
xfs_qm_dqiterate(
xfs_qm_quotacheck_dqadjust(
xfs_qm_get_rtblks(
xfs_qm_dqusage_adjust(
xfs_qm_quotacheck(
xfs_qm_init_quotainos(
xfs_qm_dqreclaim_one(void)
xfs_qm_shake_freelist(
xfs_qm_shake_scan(
xfs_qm_shake_count(
xfs_qm_dqalloc_incore(
xfs_qm_write_sb_changes(
xfs_qm_vop_dqalloc(
xfs_qm_vop_chown(
xfs_qm_vop_chown_reserve(
xfs_qm_vop_rename_dqattach(
xfs_qm_vop_create_dqattach(
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
colour. ;)
Cheers,
Dave.
--
Dave Chinner
david@...morbit.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists