public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/2] allow inode64 mount option on 32 bit systems
@ 2008-10-27 13:30 Christoph Hellwig
  2008-10-27 23:37 ` Dave Chinner
  0 siblings, 1 reply; 4+ messages in thread
From: Christoph Hellwig @ 2008-10-27 13:30 UTC (permalink / raw)
  To: xfs

[-- Attachment #1: xfs-allow-inode64-on-32bit --]
[-- Type: text/plain, Size: 1649 bytes --]

Now that we've stopped using the Linux inode cache when can trivally
support the inode64 mount option on 32bit architectures.  As far as the
kernel and most userspace is concerned this works perfectly, but
applications still using really old stat and readdir interfaces will get
an EOVERFLOW error when hitting an inode number not fitting into 32
bits (that problem of course also exists when using these applications
on a 64bit kernel).

Note that because inode64 is simply a mount option we can currently
mount a filesystem having > 32 bit inode numbers and cause a variety of
problems, all this is solved but this patch which enables XFS_BIG_INUMS,
even when inode64 is not used.

(First sent on October 18th)


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

Index: xfs-2.6/fs/xfs/linux-2.6/xfs_linux.h
===================================================================
--- xfs-2.6.orig/fs/xfs/linux-2.6/xfs_linux.h	2008-10-18 12:17:40.000000000 +0200
+++ xfs-2.6/fs/xfs/linux-2.6/xfs_linux.h	2008-10-18 12:19:30.000000000 +0200
@@ -21,18 +21,12 @@
 #include <linux/types.h>
 
 /*
- * Some types are conditional depending on the target system.
  * XFS_BIG_BLKNOS needs block layer disk addresses to be 64 bits.
- * XFS_BIG_INUMS needs the VFS inode number to be 64 bits, as well
- * as requiring XFS_BIG_BLKNOS to be set.
+ * XFS_BIG_INUMS requires XFS_BIG_BLKNOS to be set.
  */
 #if defined(CONFIG_LBD) || (BITS_PER_LONG == 64)
 # define XFS_BIG_BLKNOS	1
-# if BITS_PER_LONG == 64
-#  define XFS_BIG_INUMS	1
-# else
-#  define XFS_BIG_INUMS	0
-# endif
+# define XFS_BIG_INUMS	1
 #else
 # define XFS_BIG_BLKNOS	0
 # define XFS_BIG_INUMS	0

-- 

^ permalink raw reply	[flat|nested] 4+ messages in thread
* [PATCH 2/2] allow inode64 mount option on 32 bit systems
@ 2008-10-26 20:34 Christoph Hellwig
  2008-10-27  1:21 ` Dave Chinner
  0 siblings, 1 reply; 4+ messages in thread
From: Christoph Hellwig @ 2008-10-26 20:34 UTC (permalink / raw)
  To: xfs

[-- Attachment #1: xfs-allow-inode64-on-32bit --]
[-- Type: text/plain, Size: 1649 bytes --]

Now that we've stopped using the Linux inode cache when can trivally
support the inode64 mount option on 32bit architectures.  As far as the
kernel and most userspace is concerned this works perfectly, but
applications still using really old stat and readdir interfaces will get
an EOVERFLOW error when hitting an inode number not fitting into 32
bits (that problem of course also exists when using these applications
on a 64bit kernel).

Note that because inode64 is simply a mount option we can currently
mount a filesystem having > 32 bit inode numbers and cause a variety of
problems, all this is solved but this patch which enables XFS_BIG_INUMS,
even when inode64 is not used.

(First sent on October 18th)


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

Index: xfs-2.6/fs/xfs/linux-2.6/xfs_linux.h
===================================================================
--- xfs-2.6.orig/fs/xfs/linux-2.6/xfs_linux.h	2008-10-18 12:17:40.000000000 +0200
+++ xfs-2.6/fs/xfs/linux-2.6/xfs_linux.h	2008-10-18 12:19:30.000000000 +0200
@@ -21,18 +21,12 @@
 #include <linux/types.h>
 
 /*
- * Some types are conditional depending on the target system.
  * XFS_BIG_BLKNOS needs block layer disk addresses to be 64 bits.
- * XFS_BIG_INUMS needs the VFS inode number to be 64 bits, as well
- * as requiring XFS_BIG_BLKNOS to be set.
+ * XFS_BIG_INUMS requires XFS_BIG_BLKNOS to be set.
  */
 #if defined(CONFIG_LBD) || (BITS_PER_LONG == 64)
 # define XFS_BIG_BLKNOS	1
-# if BITS_PER_LONG == 64
-#  define XFS_BIG_INUMS	1
-# else
-#  define XFS_BIG_INUMS	0
-# endif
+# define XFS_BIG_INUMS	1
 #else
 # define XFS_BIG_BLKNOS	0
 # define XFS_BIG_INUMS	0

-- 

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

end of thread, other threads:[~2008-10-27 23:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-27 13:30 [PATCH 2/2] allow inode64 mount option on 32 bit systems Christoph Hellwig
2008-10-27 23:37 ` Dave Chinner
  -- strict thread matches above, loose matches on Subject: below --
2008-10-26 20:34 Christoph Hellwig
2008-10-27  1:21 ` Dave Chinner

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