public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfs: fix exporting with left over 64-bit inodes
@ 2010-11-19 13:38 Christoph Hellwig
  2010-11-20  8:29 ` Michael Monnerie
  2010-11-22  0:37 ` Dave Chinner
  0 siblings, 2 replies; 6+ messages in thread
From: Christoph Hellwig @ 2010-11-19 13:38 UTC (permalink / raw)
  To: xfs; +Cc: Samuel Kvasnica

From: Samuel Kvasnica <samuel.kvasnica@ims.co.at>

We now support mounting and using filesystems with 64-bit inodes even
when not mounted with the inode64 option (which now only controls if
we allocate new inodes in that space or not).  Make sure we always
use large NFS file handles when exporting a filesystem that may contain
64-bit inodes.  Note that this only affects newly generated file handles,
any outstanding 32-bit file handle is still accepted.

[hch: the comment and commit log are mine, the rest is from a patch
 snipplet from Samuel]

Signed-off-by: Christoph Hellwig <hch@lst.de>

Index: xfs/fs/xfs/linux-2.6/xfs_export.c
===================================================================
--- xfs.orig/fs/xfs/linux-2.6/xfs_export.c	2010-11-10 17:08:27.341529680 +0100
+++ xfs/fs/xfs/linux-2.6/xfs_export.c	2010-11-10 17:10:10.321529680 +0100
@@ -70,8 +70,16 @@ xfs_fs_encode_fh(
 	else
 		fileid_type = FILEID_INO32_GEN_PARENT;
 
-	/* filesystem may contain 64bit inode numbers */
-	if (!(XFS_M(inode->i_sb)->m_flags & XFS_MOUNT_SMALL_INUMS))
+	/*
+	 * If the the filesystem may contain 64bit inode numbers, we need
+	 * to use larger file handles that can represent them.
+	 *
+	 * While we only allocate inodes that do not fit into 32 bits any
+	 * large enough filesystem may contain them, thus the slightly
+	 * confusing looking conditional below.
+	 */
+	if (!(XFS_M(inode->i_sb)->m_flags & XFS_MOUNT_SMALL_INUMS) ||
+	    (XFS_M(inode->i_sb)->m_flags & XFS_MOUNT_32BITINODES))
 		fileid_type |= XFS_FILEID_TYPE_64FLAG;
 
 	/*

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

end of thread, other threads:[~2010-11-22 10:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-19 13:38 [PATCH] xfs: fix exporting with left over 64-bit inodes Christoph Hellwig
2010-11-20  8:29 ` Michael Monnerie
2010-11-21 10:57   ` Christoph Hellwig
2010-11-22  0:37 ` Dave Chinner
2010-11-22  9:05   ` Samuel Kvasnica
2010-11-22 10: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