From: Brian Foster <bfoster@redhat.com>
To: Eric Sandeen <sandeen@redhat.com>
Cc: xfs-oss <xfs@oss.sgi.com>
Subject: Re: [PATCH] xfs: collapse allocsize and biosize mount option handling
Date: Mon, 24 Aug 2015 08:41:12 -0400 [thread overview]
Message-ID: <20150824124110.GC50895@bfoster.bfoster> (raw)
In-Reply-To: <55D79504.6040305@redhat.com>
On Fri, Aug 21, 2015 at 04:15:48PM -0500, Eric Sandeen wrote:
> The allocsize and biosize mount options are handled identically,
> other than allocsize accepting suffixes. suffix_kstrtoint handles
> bare numbers just fine too, so these can be collapsed.
>
> (In other news, though, maybe biosize needs to be deprecated?
> XFS_IOC_SETBIOSIZE and XFS_IOC_GETBIOSIZE are deprecated, and
> "biosize" was removed from Documentation/ back in 2005 ...)
>
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
> ---
Reviewed-by: Brian Foster <bfoster@redhat.com>
>
> diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
> index 1fb1656..4bd6c0d 100644
> --- a/fs/xfs/xfs_super.c
> +++ b/fs/xfs/xfs_super.c
> @@ -261,16 +261,8 @@ xfs_parseargs(
> mp->m_rtname = kstrndup(value, MAXNAMELEN, GFP_KERNEL);
> if (!mp->m_rtname)
> return -ENOMEM;
> - } else if (!strcmp(this_char, MNTOPT_BIOSIZE)) {
> - if (!value || !*value) {
> - xfs_warn(mp, "%s option requires an argument",
> - this_char);
> - return -EINVAL;
> - }
> - if (kstrtoint(value, 10, &iosize))
> - return -EINVAL;
> - iosizelog = ffs(iosize) - 1;
> - } else if (!strcmp(this_char, MNTOPT_ALLOCSIZE)) {
> + } else if (!strcmp(this_char, MNTOPT_ALLOCSIZE) ||
> + !strcmp(this_char, MNTOPT_BIOSIZE)) {
> if (!value || !*value) {
> xfs_warn(mp, "%s option requires an argument",
> this_char);
>
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
prev parent reply other threads:[~2015-08-24 12:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-21 21:15 [PATCH] xfs: collapse allocsize and biosize mount option handling Eric Sandeen
2015-08-24 12:41 ` Brian Foster [this message]
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=20150824124110.GC50895@bfoster.bfoster \
--to=bfoster@redhat.com \
--cc=sandeen@redhat.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.