summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorTakashi Sato <sho@tnes.nec.co.jp>2006-03-26 01:37:52 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-26 08:57:00 -0800
commita0f62ac6362c168754cccb36f196b3dfbddc3bc3 (patch)
tree079d525cfbf9851e2cb30acda77d180388d03c69 /include
parentabcb6c9fd13fc2ad7757b818924dc8109a0e3775 (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>
Diffstat (limited to 'include')
-rw-r--r--include/asm-h8300/types.h3
-rw-r--r--include/asm-i386/types.h5
-rw-r--r--include/asm-mips/types.h5
-rw-r--r--include/asm-powerpc/types.h5
-rw-r--r--include/asm-s390/types.h5
-rw-r--r--include/asm-sh/types.h5
-rw-r--r--include/linux/fs.h2
-rw-r--r--include/linux/types.h4
8 files changed, 33 insertions, 1 deletions
diff --git a/include/asm-h8300/types.h b/include/asm-h8300/types.h
index bf91e0d4dde..da2402b8654 100644
--- a/include/asm-h8300/types.h
+++ b/include/asm-h8300/types.h
@@ -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__ */
diff --git a/include/asm-i386/types.h b/include/asm-i386/types.h
index ced00fe8fe6..e50a08bd7ce 100644
--- a/include/asm-i386/types.h
+++ b/include/asm-i386/types.h
@@ -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__ */
diff --git a/include/asm-mips/types.h b/include/asm-mips/types.h
index 421b3aea14c..cd2813d8e13 100644
--- a/include/asm-mips/types.h
+++ b/include/asm-mips/types.h
@@ -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__ */
diff --git a/include/asm-powerpc/types.h b/include/asm-powerpc/types.h
index ec3c2ee8bf8..baabba96e31 100644
--- a/include/asm-powerpc/types.h
+++ b/include/asm-powerpc/types.h
@@ -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__ */
diff --git a/include/asm-s390/types.h b/include/asm-s390/types.h
index d0be3e47701..5738ad63537 100644
--- a/include/asm-s390/types.h
+++ b/include/asm-s390/types.h
@@ -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__ */
diff --git a/include/asm-sh/types.h b/include/asm-sh/types.h
index cb7e183a0a6..488552f43b2 100644
--- a/include/asm-sh/types.h
+++ b/include/asm-sh/types.h
@@ -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__ */
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 64b0ca4f14e..155d29d5e5e 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -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;
diff --git a/include/linux/types.h b/include/linux/types.h
index 54ae2d59e71..1046c7ad86d 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -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.