xfs: fix exporting with left over 64-bit inodes
PATCH 1/1 xfs: fix exporting with left over 64-bit inodes
From: Samuel Kvasnica <[email protected]>
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]
fs/xfs/linux-2.6/xfs_export.c +10 -2
@@ -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
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Quoted 6 lines · 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?
Signature · 11 lines
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/
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Quoted 10 lines · Michael Monnerie
Quoted 6 lines · 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
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Quoted 9 lines · Christoph Hellwig
From: Samuel Kvasnica <[email protected]>
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.
Quoted 4 lines
[hch: the comment and commit log are mine, the rest is from a patch
snipplet from Samuel]Signed-off-by Christoph Hellwig <[email protected]>
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.
Signature · 7 lines
Dave Chinner [email protected] _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
Quoted 13 lines · Dave Chinner
Quoted 12 lines · Christoph Hellwig
From: Samuel Kvasnica <[email protected]>
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]
Quoted 8 lines
Quoted 1 line
Signed-off-by Christoph Hellwig <[email protected]>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
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Quoted 3 lines · Dave Chinner
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
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs