From: Eric Sandeen <sandeen@sandeen.net>
To: Carlos Maiolino <cmaiolino@redhat.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH 1/4] xfs: make inode64 as the default allocation mode
Date: Fri, 14 Sep 2012 13:06:33 -0500 [thread overview]
Message-ID: <50537229.1000801@sandeen.net> (raw)
In-Reply-To: <1347641381-30050-2-git-send-email-cmaiolino@redhat.com>
On 9/14/12 11:49 AM, Carlos Maiolino wrote:
> since 64-bit inodes can be accessed while using inode32, and these can also be
> used on 32-bit kernels, there is no reason to still keep inode32 as the default
> mount option.
>
> Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com>
> ---
> fs/xfs/xfs_super.c | 12 ++++++++++--
> 1 file changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
> index f1f2968..967d024 100644
> --- a/fs/xfs/xfs_super.c
> +++ b/fs/xfs/xfs_super.c
> @@ -88,6 +88,8 @@ mempool_t *xfs_ioend_pool;
> * unwritten extent conversion */
> #define MNTOPT_NOBARRIER "nobarrier" /* .. disable */
> #define MNTOPT_64BITINODE "inode64" /* inodes can be allocated anywhere */
> +#define MNTOPT_32BITINODE "inode32" /* inode allocation limited to
> + * XFS_MAXINUMBER_32 */
> #define MNTOPT_IKEEP "ikeep" /* do not free empty inode clusters */
> #define MNTOPT_NOIKEEP "noikeep" /* free empty inode clusters */
> #define MNTOPT_LARGEIO "largeio" /* report large I/O sizes in stat() */
> @@ -198,7 +200,6 @@ xfs_parseargs(
> */
> mp->m_flags |= XFS_MOUNT_BARRIER;
> mp->m_flags |= XFS_MOUNT_COMPAT_IOSIZE;
> - mp->m_flags |= XFS_MOUNT_SMALL_INUMS;
Self-note-taking.
XFS_BIG_INUMS means the kernel itself is capable of > 32 bit inode nrs in struct inode.
XFS_MOUNT_SMALL_INUMS is "users wants 32bit inodes "
XFS_MOUNT_32BITINODES is "do not create inodes above 32 bits"
MNTOPT_32BITINODE is the actual mount option string "inode32"
I think rather than removing the line above, you might need to keep it under
#if !XFS_BIG_INUMS
mp->m_flags |= XFS_MOUNT_SMALL_INUMS;
#endif
so that "small" systems continue to enforce <= 32 bit inodes.
> /*
> * These can be overridden by the mount option parsing.
> @@ -295,6 +296,13 @@ xfs_parseargs(
> return EINVAL;
> }
> dswidth = simple_strtoul(value, &eov, 10);
> + } else if (!strcmp(this_char, MNTOPT_32BITINODE)) {
> + mp->m_flags |= XFS_MOUNT_SMALL_INUMS;
> +#if !XFS_BIG_INUMS
> + xfs_warn(mp, "%s option not allowed on this system",
> + this_char);
> + return EINVAL;
> +#endif
This looks wrong. If a user has a system which cannot handle 64 bit inodes,
you reject a request to mount with 32-bit inodes?
-Eric
> } else if (!strcmp(this_char, MNTOPT_64BITINODE)) {
> mp->m_flags &= ~XFS_MOUNT_SMALL_INUMS;
> #if !XFS_BIG_INUMS
> @@ -493,13 +501,13 @@ xfs_showargs(
> { XFS_MOUNT_FILESTREAMS, "," MNTOPT_FILESTREAM },
> { XFS_MOUNT_GRPID, "," MNTOPT_GRPID },
> { XFS_MOUNT_DISCARD, "," MNTOPT_DISCARD },
> + { XFS_MOUNT_SMALL_INUMS, "," MNTOPT_32BITINODE },
> { 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 }
> };
> struct proc_xfs_info *xfs_infop;
>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2012-09-14 18:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-14 16:49 [PATCH 0/4] inode32/inode64 allocation changes Carlos Maiolino
2012-09-14 16:49 ` [PATCH 1/4] xfs: make inode64 as the default allocation mode Carlos Maiolino
2012-09-14 18:06 ` Eric Sandeen [this message]
2012-09-17 15:08 ` Carlos Maiolino
2012-09-14 16:49 ` [PATCH 2/4] xfs: add xfs_set_inode32() Carlos Maiolino
2012-09-14 16:49 ` [PATCH 3/4] xfs: set xfs_initialize_perag() to use xfs_set_inode32/64() Carlos Maiolino
2012-09-14 16:49 ` [PATCH 4/4] xfs: Make inode32 a remountable option Carlos Maiolino
-- strict thread matches above, loose matches on Subject: below --
2012-09-17 16:51 [PATCH 0/4 V2] inode32/inode64 allocation changes Carlos Maiolino
2012-09-17 16:51 ` [PATCH 1/4] xfs: make inode64 as the default allocation mode Carlos Maiolino
2012-09-18 5:50 ` Dave Chinner
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=50537229.1000801@sandeen.net \
--to=sandeen@sandeen.net \
--cc=cmaiolino@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.