public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfs: minor inode64 mount option cleanup
@ 2012-08-01 14:56 Alex Elder
  2012-08-17 12:23 ` Christoph Hellwig
  0 siblings, 1 reply; 2+ messages in thread
From: Alex Elder @ 2012-08-01 14:56 UTC (permalink / raw)
  To: xfs

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-08-17 12:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-01 14:56 [PATCH] xfs: minor inode64 mount option cleanup Alex Elder
2012-08-17 12:23 ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox