From: Alex Elder <elder@inktank.com>
To: xfs@oss.sgi.com
Subject: [PATCH] xfs: minor inode64 mount option cleanup
Date: Wed, 01 Aug 2012 09:56:53 -0500 [thread overview]
Message-ID: <501943B5.4030309@inktank.com> (raw)
Supplying the "inode64" mount option means inode allocations should
not be restricted to "small" inode numbers (within a 32 bit range).
So in xfs_parseargs(), the XFS_MOUNT_SMALL_INUMS flag is cleared if
"inode64" is requested.
If a kernel does not support 64-bit inodes (which may be because it
doesn't support 64-bit block addresses), the "inode64" mount option
is not allowed. But even though it's treated as an invalid mount
option xfs_parseargs() still clears SMALL_INUMS flag if "inode64" is
requested.
The end result may not actually matter, but I think we should not be
changing any state (clearing the SMALL_INUMS flag) when an invalid
mount option is supplied.
So this just makes sure the SMALL_INUMS flag is only cleared if the
kernel supports big inode numbers.
Signed-off-by: Alex Elder <elder@inktank.com>
---
fs/xfs/xfs_super.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
Index: b/fs/xfs/xfs_super.c
===================================================================
--- a/fs/xfs/xfs_super.c
+++ b/fs/xfs/xfs_super.c
@@ -295,12 +295,13 @@ xfs_parseargs(
}
dswidth = simple_strtoul(value, &eov, 10);
} else if (!strcmp(this_char, MNTOPT_64BITINODE)) {
+#if XFS_BIG_INUMS
mp->m_flags &= ~XFS_MOUNT_SMALL_INUMS;
-#if !XFS_BIG_INUMS
+#else /* !XFS_BIG_INUMS */
xfs_warn(mp, "%s option not allowed on this system",
this_char);
return EINVAL;
-#endif
+#endif /* !XFS_BIG_INUMS */
} else if (!strcmp(this_char, MNTOPT_NOUUID)) {
mp->m_flags |= XFS_MOUNT_NOUUID;
} else if (!strcmp(this_char, MNTOPT_BARRIER)) {
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next reply other threads:[~2012-08-01 14:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-01 14:56 Alex Elder [this message]
2012-08-17 12:23 ` [PATCH] xfs: minor inode64 mount option cleanup Christoph Hellwig
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=501943B5.4030309@inktank.com \
--to=elder@inktank.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.