From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756036Ab1HXAmQ (ORCPT ); Tue, 23 Aug 2011 20:42:16 -0400 Received: from ipmail06.adl6.internode.on.net ([150.101.137.145]:60640 "EHLO ipmail06.adl6.internode.on.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752730Ab1HXAmK (ORCPT ); Tue, 23 Aug 2011 20:42:10 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvcDAIhIVE55LIxDgWdsb2JhbABCp2gVAQEWJiWBQAEBBAEyASMjBQsIAxguFCUDIROHcbxcDoY6BKQl Date: Wed, 24 Aug 2011 10:42:06 +1000 From: Dave Chinner To: Linus Torvalds Cc: Alex Elder , linux-kernel@vger.kernel.org, xfs@oss.sgi.com, akpm@linux-foundation.org Subject: Re: [GIT PULL] XFS update for 3.1-rc4 Message-ID: <20110824004206.GG3162@dastard> References: <201108231739.p7NHdXQ8008360@stout.americas.sgi.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 23, 2011 at 11:46:30AM -0700, Linus Torvalds wrote: > On Tue, Aug 23, 2011 at 10:39 AM, Alex Elder 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@fromorbit.com