* [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
* Re: [PATCH] xfs: fix exporting with left over 64-bit inodes
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
1 sibling, 1 reply; 6+ messages in thread
From: Michael Monnerie @ 2010-11-20 8:29 UTC (permalink / raw)
To: xfs; +Cc: Christoph Hellwig, Samuel Kvasnica
[-- Attachment #1.1: Type: Text/Plain, Size: 943 bytes --]
On Freitag, 19. November 2010 Christoph Hellwig wrote:
> 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.
Could that help with the problem of not being able to mount an NFS share
when the top shared dir itself is a 64bit inode?
--
mit freundlichen Grüssen,
Michael Monnerie, Ing. BSc
it-management Internet Services: Protéger
http://proteger.at [gesprochen: Prot-e-schee]
Tel: +43 660 / 415 6531
// ****** Radiointerview zum Thema Spam ******
// http://www.it-podcast.at/archiv.html#podcast-100716
//
// Haus zu verkaufen: http://zmi.at/langegg/
[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
[-- Attachment #2: Type: text/plain, Size: 121 bytes --]
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] xfs: fix exporting with left over 64-bit inodes
2010-11-20 8:29 ` Michael Monnerie
@ 2010-11-21 10:57 ` Christoph Hellwig
0 siblings, 0 replies; 6+ messages in thread
From: Christoph Hellwig @ 2010-11-21 10:57 UTC (permalink / raw)
To: Michael Monnerie; +Cc: Christoph Hellwig, Samuel Kvasnica, xfs
On Sat, Nov 20, 2010 at 09:29:06AM +0100, Michael Monnerie wrote:
> On Freitag, 19. November 2010 Christoph Hellwig wrote:
> > 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.
>
> Could that help with the problem of not being able to mount an NFS share
> when the top shared dir itself is a 64bit inode?
No, that's an NFSD issue, and not fixable in XFS itself.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] xfs: fix exporting with left over 64-bit inodes
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-22 0:37 ` Dave Chinner
2010-11-22 9:05 ` Samuel Kvasnica
2010-11-22 10:23 ` Christoph Hellwig
1 sibling, 2 replies; 6+ messages in thread
From: Dave Chinner @ 2010-11-22 0:37 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: Samuel Kvasnica, xfs
On Fri, Nov 19, 2010 at 08:38:49AM -0500, Christoph Hellwig wrote:
> 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>
Won't this mean that people exporting non-root directories suddenly
have those exports stop working on a kernel upgrade due to changing
the handle format?
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] xfs: fix exporting with left over 64-bit inodes
2010-11-22 0:37 ` Dave Chinner
@ 2010-11-22 9:05 ` Samuel Kvasnica
2010-11-22 10:23 ` Christoph Hellwig
1 sibling, 0 replies; 6+ messages in thread
From: Samuel Kvasnica @ 2010-11-22 9:05 UTC (permalink / raw)
To: Dave Chinner; +Cc: Christoph Hellwig, xfs
On 11/22/2010 01:37 AM, Dave Chinner wrote:
> On Fri, Nov 19, 2010 at 08:38:49AM -0500, Christoph Hellwig wrote:
>> 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>
> Won't this mean that people exporting non-root directories suddenly
> have those exports stop working on a kernel upgrade due to changing
> the handle format?
>
> Cheers,
>
> Dave.
Hello Dave,
nothing is really changing, it is a bugfix. NFS was trying to use 32bit
inodes which was incorrect (i.e. broken at client) for xfs filesystem
containing 64bit inodes in one special case. This is fixed now.
regards,
Sam
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] xfs: fix exporting with left over 64-bit inodes
2010-11-22 0:37 ` Dave Chinner
2010-11-22 9:05 ` Samuel Kvasnica
@ 2010-11-22 10:23 ` Christoph Hellwig
1 sibling, 0 replies; 6+ messages in thread
From: Christoph Hellwig @ 2010-11-22 10:23 UTC (permalink / raw)
To: Dave Chinner; +Cc: Christoph Hellwig, Samuel Kvasnica, xfs
On Mon, Nov 22, 2010 at 11:37:54AM +1100, Dave Chinner wrote:
> Won't this mean that people exporting non-root directories suddenly
> have those exports stop working on a kernel upgrade due to changing
> the handle format?
No, if NFSD used ->encode_fh to encode the handle for the export
directory we wouldn't even have that problem. NFSD directly encodes
i_ino as 32-bit value for the legacy subdirectory export fs handle.
So it will break whenever that particulat inode has a too large
inode number.
Check fs/nfsd/nfsfh.h:mk_fsid() for the glory details.
_______________________________________________
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