public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Wanlong Gao <gaowanlong@cn.fujitsu.com>
To: Dave Chinner <david@fromorbit.com>
Cc: Christoph Hellwig <hch@infradead.org>, Ben Myers <bpm@sgi.com>,
	XFS <xfs@oss.sgi.com>
Subject: Re: [PATCH 2/2] xfs: rename xfs_fs_* to xfs_*
Date: Mon, 02 Jul 2012 08:39:26 +0800	[thread overview]
Message-ID: <4FF0EDBE.3050009@cn.fujitsu.com> (raw)
In-Reply-To: <20120701234707.GL19223@dastard>

On 07/02/2012 07:47 AM, Dave Chinner wrote:
> On Sat, Jun 30, 2012 at 02:06:42AM +0800, Wanlong Gao wrote:
>> s/xfs_fs_/xfs_/
>> This too long name is unnecessary.
> 
> NACK. Not the right way to approach the problem.
> 
> Yes, there are a couple of places where this could be done, but most
> of the transformations, IMO, are wrong and remove critical
> information from the namespace.
> 
> Firstly, we want to get rid of the xfs_fs_subr.c wrappers and
> replace them with the native linux functions, not move them around.
> 
> Secondly, transformations like xfs_fs_geometry to xfs_geometry are
> incorrect - the function is returning the filesystem geometry, so
> the name "fs_geometry" is actually correct. Similar for
> xfs_fs_writeable, xfs_fs_show_options and so on.

Thank you for teaching this.

Wanlong Gao

> 
> Finally:
> 
>>  const struct export_operations xfs_export_operations = {
>> -	.encode_fh		= xfs_fs_encode_fh,
>> -	.fh_to_dentry		= xfs_fs_fh_to_dentry,
>> -	.fh_to_parent		= xfs_fs_fh_to_parent,
>> -	.get_parent		= xfs_fs_get_parent,
>> -	.commit_metadata	= xfs_fs_nfs_commit_metadata,
>> +	.encode_fh		= xfs_encode_fh,
>> +	.fh_to_dentry		= xfs_fh_to_dentry,
>> +	.fh_to_parent		= xfs_fh_to_parent,
>> +	.get_parent		= xfs_get_parent,
>> +	.commit_metadata	= xfs_nfs_commit_metadata,
> 
> ....
> 
>>  static const struct super_operations xfs_super_operations = {
>> -	.alloc_inode		= xfs_fs_alloc_inode,
>> -	.destroy_inode		= xfs_fs_destroy_inode,
>> -	.dirty_inode		= xfs_fs_dirty_inode,
>> -	.evict_inode		= xfs_fs_evict_inode,
>> -	.drop_inode		= xfs_fs_drop_inode,
>> -	.put_super		= xfs_fs_put_super,
>> -	.sync_fs		= xfs_fs_sync_fs,
>> -	.freeze_fs		= xfs_fs_freeze,
>> -	.unfreeze_fs		= xfs_fs_unfreeze,
>> -	.statfs			= xfs_fs_statfs,
>> -	.remount_fs		= xfs_fs_remount,
>> -	.show_options		= xfs_fs_show_options,
>> -	.nr_cached_objects	= xfs_fs_nr_cached_objects,
>> -	.free_cached_objects	= xfs_fs_free_cached_objects,
>> +	.alloc_inode		= xfs_alloc_inode,
>> +	.destroy_inode		= xfs_destroy_inode,
>> +	.dirty_inode		= xfs_dirty_inode,
>> +	.evict_inode		= xfs_evict_inode,
>> +	.drop_inode		= xfs_drop_inode,
>> +	.put_super		= xfs_put_super,
>> +	.sync_fs		= xfs_sync_fs,
>> +	.freeze_fs		= xfs_freeze,
>> +	.unfreeze_fs		= xfs_unfreeze,
>> +	.statfs			= xfs_statfs,
>> +	.remount_fs		= xfs_remount,
>> +	.show_options		= xfs_show_options,
>> +	.nr_cached_objects	= xfs_nr_cached_objects,
>> +	.free_cached_objects	= xfs_free_cached_objects,
>>  };
> 
> These should indicate that there is a valid, consistent namespacing
> here to indicate layering of the the code. i.e. that xfs_fs_*
> functions are typically VFS method functions of some kind. 
> 
>> -static struct file_system_type xfs_fs_type = {
>> +static struct file_system_type xfs_type = {
> 
> And that is a clear demonstration of my second point....
> 
> Cheers,
> 
> Dave.
> 


_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2012-07-02  1:40 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-27 16:57 [PATCH] xfs: cleanup the mount options Wanlong Gao
2012-06-27 17:44 ` Christoph Hellwig
2012-06-28  0:54   ` Wanlong Gao
2012-06-28 16:01     ` Ben Myers
2012-06-28 16:33       ` Zach Brown
2012-06-28 19:54         ` Carlos Maiolino
2012-06-29  1:00         ` Wanlong Gao
2012-06-29 16:29           ` Zach Brown
2012-06-29 16:37             ` Wanlong Gao
2012-06-29 18:06 ` [PATCH 1/2 V2] " Wanlong Gao
2012-06-29 18:06   ` [PATCH 2/2] xfs: rename xfs_fs_* to xfs_* Wanlong Gao
2012-07-01 23:47     ` Dave Chinner
2012-07-02  0:39       ` Wanlong Gao [this message]
2012-07-02  6:26   ` [PATCH 1/2 V2] xfs: cleanup the mount options Christoph Hellwig
2012-07-02  7:05     ` [PATCH V3] " Wanlong Gao
2012-07-06  3:05       ` Dave Chinner
2012-07-08 11:36         ` [PATCH V4] " Wanlong Gao
2012-07-09  0:22           ` Dave Chinner
2012-07-09  9:21             ` Wanlong Gao
2012-07-11  2:26               ` Dave Chinner
2012-07-11  6:29                 ` [PATCH V5] " Wanlong Gao
2012-07-16  8:06                   ` Wanlong Gao
2012-07-23 20:33                     ` Ben Myers
2012-07-23 23:28                   ` Dave Chinner
2012-07-24  2:01                     ` Wanlong Gao
2012-07-24 21:18                       ` Dave Chinner
2012-07-25  1:09                         ` Wanlong Gao
2012-07-25  1:11                         ` [PATCH V7] " Wanlong Gao
2012-07-29 22:09                           ` Dave Chinner
2012-08-28 19:38                           ` Ben Myers
2012-07-24  2:10                     ` [PATCH V6] " Wanlong Gao

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=4FF0EDBE.3050009@cn.fujitsu.com \
    --to=gaowanlong@cn.fujitsu.com \
    --cc=bpm@sgi.com \
    --cc=david@fromorbit.com \
    --cc=hch@infradead.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