]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] 2TB files: add blkcnt_t
authorTakashi Sato <sho@tnes.nec.co.jp>
Sun, 26 Mar 2006 09:37:52 +0000 (01:37 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sun, 26 Mar 2006 16:57:00 +0000 (08:57 -0800)
Add blkcnt_t as the type of inode.i_blocks.  This enables you to make the size
of blkcnt_t either 4 bytes or 8 bytes on 32 bits architecture with CONFIG_LSF.

- CONFIG_LSF
  Add new configuration parameter.
- blkcnt_t
  On h8300, i386, mips, powerpc, s390 and sh that define sector_t,
  blkcnt_t is defined as u64 if CONFIG_LSF is enabled; otherwise it is
  defined as unsigned long.
  On other architectures, it is defined as unsigned long.
- inode.i_blocks
  Change the type from sector_t to blkcnt_t.

Signed-off-by: Takashi Sato <sho@tnes.nec.co.jp>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
block/Kconfig
include/asm-h8300/types.h
include/asm-i386/types.h
include/asm-mips/types.h
include/asm-powerpc/types.h
include/asm-s390/types.h
include/asm-sh/types.h
include/linux/fs.h
include/linux/types.h

index 96783645092dc106cd4f4b300958aeae5b684e2a..43ca070dc0f81b58ba2a2757bf907acce36b02bc 100644 (file)
@@ -23,4 +23,13 @@ config BLK_DEV_IO_TRACE
 
          git://brick.kernel.dk/data/git/blktrace.git
 
+config LSF
+       bool "Support for Large Single Files"
+       depends on X86 || (MIPS && 32BIT) || PPC32 || ARCH_S390_31 || SUPERH || UML
+       default n
+       help
+         When CONFIG_LBD is disabled, say Y here if you want to
+         handle large file(bigger than 2TB), otherwise say N.
+         When CONFIG_LBD is enabled, Y is set automatically.
+
 source block/Kconfig.iosched
index bf91e0d4dde77775a46650f29f107096c2914147..da2402b8654059149e2ee9d13e777997b720731d 100644 (file)
@@ -58,6 +58,9 @@ typedef u32 dma_addr_t;
 #define HAVE_SECTOR_T
 typedef u64 sector_t;
 
+#define HAVE_BLKCNT_T
+typedef u64 blkcnt_t;
+
 #endif /* __KERNEL__ */
 
 #endif /* __ASSEMBLY__ */
index ced00fe8fe61c0667840795158b234c58fa35ebc..e50a08bd7ced0ef43ac153958d613f85f89fb7cc 100644 (file)
@@ -63,6 +63,11 @@ typedef u64 sector_t;
 #define HAVE_SECTOR_T
 #endif
 
+#ifdef CONFIG_LSF
+typedef u64 blkcnt_t;
+#define HAVE_BLKCNT_T
+#endif
+
 #endif /* __ASSEMBLY__ */
 
 #endif /* __KERNEL__ */
index 421b3aea14cc9425ac30064fa427c068f89f158f..cd2813d8e136af1f64d7b54b1f34661459e21110 100644 (file)
@@ -99,6 +99,11 @@ typedef u64 sector_t;
 #define HAVE_SECTOR_T
 #endif
 
+#ifdef CONFIG_LSF
+typedef u64 blkcnt_t;
+#define HAVE_BLKCNT_T
+#endif
+
 #endif /* __ASSEMBLY__ */
 
 #endif /* __KERNEL__ */
index ec3c2ee8bf86e7a52e59e6531904b881cfce4801..baabba96e31342ecf9be2af2a9d7c335fe4630be 100644 (file)
@@ -103,6 +103,11 @@ typedef u64 sector_t;
 #define HAVE_SECTOR_T
 #endif
 
+#ifdef CONFIG_LSF
+typedef u64 blkcnt_t;
+#define HAVE_BLKCNT_T
+#endif
+
 #endif /* __ASSEMBLY__ */
 
 #endif /* __KERNEL__ */
index d0be3e477013de865a513c84096753eb9b1e6bfb..5738ad63537c53228dcdc4cf70b2a72c54f32c99 100644 (file)
@@ -93,6 +93,11 @@ typedef u64 sector_t;
 #define HAVE_SECTOR_T
 #endif
 
+#ifdef CONFIG_LSF
+typedef u64 blkcnt_t;
+#define HAVE_BLKCNT_T
+#endif
+
 #endif /* ! __s390x__   */
 #endif /* __ASSEMBLY__  */
 #endif /* __KERNEL__    */
index cb7e183a0a6beabbec8b1b0dd14d3fd53886caaa..488552f43b2a17bf866168f8636d91d1fa14d448 100644 (file)
@@ -58,6 +58,11 @@ typedef u64 sector_t;
 #define HAVE_SECTOR_T
 #endif
 
+#ifdef CONFIG_LSF
+typedef u64 blkcnt_t;
+#define HAVE_BLKCNT_T
+#endif
+
 #endif /* __ASSEMBLY__ */
 
 #endif /* __KERNEL__ */
index 64b0ca4f14e390e3e66b14f35a7aff51ef10d857..155d29d5e5e4db72a4a5d8dd23671c8ee183f4c6 100644 (file)
@@ -490,7 +490,7 @@ struct inode {
        unsigned int            i_blkbits;
        unsigned long           i_blksize;
        unsigned long           i_version;
-       sector_t                i_blocks;
+       blkcnt_t                i_blocks;
        unsigned short          i_bytes;
        spinlock_t              i_lock; /* i_blocks, i_bytes, maybe i_size */
        struct mutex            i_mutex;
index 54ae2d59e71bcd2b34c54a099dcb6773736b2bcb..1046c7ad86d91f482947a72c4696e4007cbf272f 100644 (file)
@@ -137,6 +137,10 @@ typedef            __s64           int64_t;
 typedef unsigned long sector_t;
 #endif
 
+#ifndef HAVE_BLKCNT_T
+typedef unsigned long blkcnt_t;
+#endif
+
 /*
  * The type of an index into the pagecache.  Use a #define so asm/types.h
  * can override it.