From: Christoph Hellwig <hch@infradead.org>
To: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Cc: Christoph Hellwig <hch@infradead.org>, Ben Myers <bpm@sgi.com>,
Zach Brown <zab@zabbo.net>, XFS <xfs@oss.sgi.com>
Subject: Re: [PATCH 1/2 V2] xfs: cleanup the mount options
Date: Mon, 2 Jul 2012 02:26:25 -0400 [thread overview]
Message-ID: <20120702062625.GB20804@infradead.org> (raw)
In-Reply-To: <1340993202-5560-1-git-send-email-gaowanlong@cn.fujitsu.com>
On Sat, Jun 30, 2012 at 02:06:41AM +0800, Wanlong Gao wrote:
> remove the mount options macro, use tokens instead.
>
> CC: Ben Myers <bpm@sgi.com>
> CC: Christoph Hellwig <hch@infradead.org>
> CC: Dave Chinner <david@fromorbit.com>
> CC: Zach Brown <zab@zabbo.net>
> Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
> ---
> fs/xfs/xfs_super.c | 523 ++++++++++++++++++++++++++++------------------------
> 1 file changed, 287 insertions(+), 236 deletions(-)
This looks pretty good, some minor comments below:
> /*
> * Table driven mount option parser.
> */
This comment can go now that there is only a single mount option parser.
> +free_string:
> + kfree(string);
> + string = NULL;
> +free_orig:
> + kfree(orig);
> + return ret;
> +}
no need to set string to NULL just before returning.
> - static struct proc_xfs_info xfs_info_set[] = {
> - /* the few simple ones we can get from the mount struct */
> - { XFS_MOUNT_IKEEP, "," MNTOPT_IKEEP },
> - { XFS_MOUNT_WSYNC, "," MNTOPT_WSYNC },
> - { XFS_MOUNT_NOALIGN, "," MNTOPT_NOALIGN },
> - { XFS_MOUNT_SWALLOC, "," MNTOPT_SWALLOC },
> - { XFS_MOUNT_NOUUID, "," MNTOPT_NOUUID },
> - { XFS_MOUNT_NORECOVERY, "," MNTOPT_NORECOVERY },
> - { XFS_MOUNT_ATTR2, "," MNTOPT_ATTR2 },
> - { XFS_MOUNT_FILESTREAMS, "," MNTOPT_FILESTREAM },
> - { XFS_MOUNT_GRPID, "," MNTOPT_GRPID },
> - { XFS_MOUNT_DISCARD, "," MNTOPT_DISCARD },
> - { 0, NULL }
> - };
> - static struct proc_xfs_info xfs_info_unset[] = {
> - /* the few simple ones we can get from the mount struct */
> - { XFS_MOUNT_COMPAT_IOSIZE, "," MNTOPT_LARGEIO },
> - { XFS_MOUNT_BARRIER, "," MNTOPT_NOBARRIER },
> - { XFS_MOUNT_SMALL_INUMS, "," MNTOPT_64BITINODE },
> - { 0, NULL }
> - };
I can't find any good reason to remove these tables, just replace the
MNTOPT_ constants with the plain strings.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2012-07-02 6:26 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
2012-07-02 6:26 ` Christoph Hellwig [this message]
2012-07-02 7:05 ` [PATCH V3] xfs: cleanup the mount options 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=20120702062625.GB20804@infradead.org \
--to=hch@infradead.org \
--cc=bpm@sgi.com \
--cc=gaowanlong@cn.fujitsu.com \
--cc=xfs@oss.sgi.com \
--cc=zab@zabbo.net \
/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