[PATCH] xfs: cleanup the mount options

Ben Myers bpm at sgi.com
Thu Jun 28 11:01:56 CDT 2012


Hey Wanlong,

On Thu, Jun 28, 2012 at 08:54:19AM +0800, Wanlong Gao wrote:
> On 06/28/2012 01:44 AM, Christoph Hellwig wrote:
> > On Thu, Jun 28, 2012 at 12:57:23AM +0800, Wanlong Gao wrote:
> >> remove the mount options macro, use tokens instead.
> >> Futher cleanup will use xfs_*_opt in xfs instead,
> >> but it may be hard to be merged in one patch.
> > 
> > Thanks a lot!
> > 
> > I like the use of the option parse a lot, this has been long overdue.
> > 
> > But is there any good reason to add the xfs_*_opt macros?  They make
> > reading and especially grepping the code a lot harder, so there better
> > be a good reason for them.
> 
> I think that using the macro makes code more clearly, and it's more
> convenient to use the macro than the original "|=", "&=" and "&" things.
> And, no more harder for reading and grepping, just omit the "XFS_MOUNT_".

Granted.  It's not hard to omit 'XFS_MOUNT_'.  The difficulty is that when you
omit XFS_MOUNT_ in your grep, you may get many more unrelated hits from other
contexts to sift through.  Maybe that's what Christoph was getting at.

> BTW, these macros were borrowed from Btrfs. I myself like it, but if
> you XFS guys all do not like, I can drop it.

It's not a strong objection from me, but I do have a preference for keeping the
XFS_MOUNT_ prefix to retain context for cscope and grep.  Maybe others feel
differently.

Regards,
	Ben



More information about the xfs mailing list