From: Christoph Hellwig <hch@infradead.org>
To: xfs@oss.sgi.com
Cc: Samuel Kvasnica <samuel.kvasnica@ims.co.at>
Subject: [PATCH] xfs: fix exporting with left over 64-bit inodes
Date: Fri, 19 Nov 2010 08:38:49 -0500 [thread overview]
Message-ID: <20101119133848.GA5471@infradead.org> (raw)
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
next reply other threads:[~2010-11-19 13:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-19 13:38 Christoph Hellwig [this message]
2010-11-20 8:29 ` [PATCH] xfs: fix exporting with left over 64-bit inodes 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
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=20101119133848.GA5471@infradead.org \
--to=hch@infradead.org \
--cc=samuel.kvasnica@ims.co.at \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox