diff options
author | Takashi Sato <sho@tnes.nec.co.jp> | 2006-03-26 04:37:52 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-26 11:57:00 -0500 |
commit | a0f62ac6362c168754cccb36f196b3dfbddc3bc3 (patch) | |
tree | 079d525cfbf9851e2cb30acda77d180388d03c69 | |
parent | abcb6c9fd13fc2ad7757b818924dc8109a0e3775 (diff) |
[PATCH] 2TB files: add blkcnt_t
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>
-rw-r--r-- | block/Kconfig | 9 | ||||
-rw-r--r-- | include/asm-h8300/types.h | 3 | ||||
-rw-r--r-- | include/asm-i386/types.h | 5 | ||||
-rw-r--r-- | include/asm-mips/types.h | 5 | ||||
-rw-r--r-- | include/asm-powerpc/types.h | 5 | ||||
-rw-r--r-- | include/asm-s390/types.h | 5 | ||||
-rw-r--r-- | include/asm-sh/types.h | 5 | ||||
-rw-r--r-- | include/linux/fs.h | 2 | ||||
-rw-r--r-- | include/linux/types.h | 4 |
9 files changed, 42 insertions, 1 deletions
diff --git a/block/Kconfig b/block/Kconfig index 96783645092d..43ca070dc0f8 100644 --- a/block/Kconfig +++ b/block/Kconfig | |||
@@ -23,4 +23,13 @@ config BLK_DEV_IO_TRACE | |||
23 | 23 | ||
24 | git://brick.kernel.dk/data/git/blktrace.git | 24 | git://brick.kernel.dk/data/git/blktrace.git |
25 | 25 | ||
26 | config LSF | ||
27 | bool "Support for Large Single Files" | ||
28 | depends on X86 || (MIPS && 32BIT) || PPC32 || ARCH_S390_31 || SUPERH || UML | ||
29 | default n | ||
30 | help | ||
31 | When CONFIG_LBD is disabled, say Y here if you want to | ||
32 | handle large file(bigger than 2TB), otherwise say N. | ||
33 | When CONFIG_LBD is enabled, Y is set automatically. | ||
34 | |||
26 | source block/Kconfig.iosched | 35 | source block/Kconfig.iosched |
diff --git a/include/asm-h8300/types.h b/include/asm-h8300/types.h index bf91e0d4dde7..da2402b86540 100644 --- a/include/asm-h8300/types.h +++ b/include/asm-h8300/types.h | |||
@@ -58,6 +58,9 @@ typedef u32 dma_addr_t; | |||
58 | #define HAVE_SECTOR_T | 58 | #define HAVE_SECTOR_T |
59 | typedef u64 sector_t; | 59 | typedef u64 sector_t; |
60 | 60 | ||
61 | #define HAVE_BLKCNT_T | ||
62 | typedef u64 blkcnt_t; | ||
63 | |||
61 | #endif /* __KERNEL__ */ | 64 | #endif /* __KERNEL__ */ |
62 | 65 | ||
63 | #endif /* __ASSEMBLY__ */ | 66 | #endif /* __ASSEMBLY__ */ |
diff --git a/include/asm-i386/types.h b/include/asm-i386/types.h index ced00fe8fe61..e50a08bd7ced 100644 --- a/include/asm-i386/types.h +++ b/include/asm-i386/types.h | |||
@@ -63,6 +63,11 @@ typedef u64 sector_t; | |||
63 | #define HAVE_SECTOR_T | 63 | #define HAVE_SECTOR_T |
64 | #endif | 64 | #endif |
65 | 65 | ||
66 | #ifdef CONFIG_LSF | ||
67 | typedef u64 blkcnt_t; | ||
68 | #define HAVE_BLKCNT_T | ||
69 | #endif | ||
70 | |||
66 | #endif /* __ASSEMBLY__ */ | 71 | #endif /* __ASSEMBLY__ */ |
67 | 72 | ||
68 | #endif /* __KERNEL__ */ | 73 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-mips/types.h b/include/asm-mips/types.h index 421b3aea14cc..cd2813d8e136 100644 --- a/include/asm-mips/types.h +++ b/include/asm-mips/types.h | |||
@@ -99,6 +99,11 @@ typedef u64 sector_t; | |||
99 | #define HAVE_SECTOR_T | 99 | #define HAVE_SECTOR_T |
100 | #endif | 100 | #endif |
101 | 101 | ||
102 | #ifdef CONFIG_LSF | ||
103 | typedef u64 blkcnt_t; | ||
104 | #define HAVE_BLKCNT_T | ||
105 | #endif | ||
106 | |||
102 | #endif /* __ASSEMBLY__ */ | 107 | #endif /* __ASSEMBLY__ */ |
103 | 108 | ||
104 | #endif /* __KERNEL__ */ | 109 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-powerpc/types.h b/include/asm-powerpc/types.h index ec3c2ee8bf86..baabba96e313 100644 --- a/include/asm-powerpc/types.h +++ b/include/asm-powerpc/types.h | |||
@@ -103,6 +103,11 @@ typedef u64 sector_t; | |||
103 | #define HAVE_SECTOR_T | 103 | #define HAVE_SECTOR_T |
104 | #endif | 104 | #endif |
105 | 105 | ||
106 | #ifdef CONFIG_LSF | ||
107 | typedef u64 blkcnt_t; | ||
108 | #define HAVE_BLKCNT_T | ||
109 | #endif | ||
110 | |||
106 | #endif /* __ASSEMBLY__ */ | 111 | #endif /* __ASSEMBLY__ */ |
107 | 112 | ||
108 | #endif /* __KERNEL__ */ | 113 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-s390/types.h b/include/asm-s390/types.h index d0be3e477013..5738ad63537c 100644 --- a/include/asm-s390/types.h +++ b/include/asm-s390/types.h | |||
@@ -93,6 +93,11 @@ typedef u64 sector_t; | |||
93 | #define HAVE_SECTOR_T | 93 | #define HAVE_SECTOR_T |
94 | #endif | 94 | #endif |
95 | 95 | ||
96 | #ifdef CONFIG_LSF | ||
97 | typedef u64 blkcnt_t; | ||
98 | #define HAVE_BLKCNT_T | ||
99 | #endif | ||
100 | |||
96 | #endif /* ! __s390x__ */ | 101 | #endif /* ! __s390x__ */ |
97 | #endif /* __ASSEMBLY__ */ | 102 | #endif /* __ASSEMBLY__ */ |
98 | #endif /* __KERNEL__ */ | 103 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-sh/types.h b/include/asm-sh/types.h index cb7e183a0a6b..488552f43b2a 100644 --- a/include/asm-sh/types.h +++ b/include/asm-sh/types.h | |||
@@ -58,6 +58,11 @@ typedef u64 sector_t; | |||
58 | #define HAVE_SECTOR_T | 58 | #define HAVE_SECTOR_T |
59 | #endif | 59 | #endif |
60 | 60 | ||
61 | #ifdef CONFIG_LSF | ||
62 | typedef u64 blkcnt_t; | ||
63 | #define HAVE_BLKCNT_T | ||
64 | #endif | ||
65 | |||
61 | #endif /* __ASSEMBLY__ */ | 66 | #endif /* __ASSEMBLY__ */ |
62 | 67 | ||
63 | #endif /* __KERNEL__ */ | 68 | #endif /* __KERNEL__ */ |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 64b0ca4f14e3..155d29d5e5e4 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -490,7 +490,7 @@ struct inode { | |||
490 | unsigned int i_blkbits; | 490 | unsigned int i_blkbits; |
491 | unsigned long i_blksize; | 491 | unsigned long i_blksize; |
492 | unsigned long i_version; | 492 | unsigned long i_version; |
493 | sector_t i_blocks; | 493 | blkcnt_t i_blocks; |
494 | unsigned short i_bytes; | 494 | unsigned short i_bytes; |
495 | spinlock_t i_lock; /* i_blocks, i_bytes, maybe i_size */ | 495 | spinlock_t i_lock; /* i_blocks, i_bytes, maybe i_size */ |
496 | struct mutex i_mutex; | 496 | struct mutex i_mutex; |
diff --git a/include/linux/types.h b/include/linux/types.h index 54ae2d59e71b..1046c7ad86d9 100644 --- a/include/linux/types.h +++ b/include/linux/types.h | |||
@@ -137,6 +137,10 @@ typedef __s64 int64_t; | |||
137 | typedef unsigned long sector_t; | 137 | typedef unsigned long sector_t; |
138 | #endif | 138 | #endif |
139 | 139 | ||
140 | #ifndef HAVE_BLKCNT_T | ||
141 | typedef unsigned long blkcnt_t; | ||
142 | #endif | ||
143 | |||
140 | /* | 144 | /* |
141 | * The type of an index into the pagecache. Use a #define so asm/types.h | 145 | * The type of an index into the pagecache. Use a #define so asm/types.h |
142 | * can override it. | 146 | * can override it. |