aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--block/Kconfig23
-rw-r--r--fs/ext4/super.c8
-rw-r--r--include/linux/types.h11
3 files changed, 12 insertions, 30 deletions
diff --git a/block/Kconfig b/block/Kconfig
index 290b219fad9..ac0956f7778 100644
--- a/block/Kconfig
+++ b/block/Kconfig
@@ -24,21 +24,17 @@ menuconfig BLOCK
24if BLOCK 24if BLOCK
25 25
26config LBD 26config LBD
27 bool "Support for Large Block Devices" 27 bool "Support for large block devices and files"
28 depends on !64BIT 28 depends on !64BIT
29 help 29 help
30 Enable block devices of size 2TB and larger. 30 Enable block devices or files of size 2TB and larger.
31 31
32 This option is required to support the full capacity of large 32 This option is required to support the full capacity of large
33 (2TB+) block devices, including RAID, disk, Network Block Device, 33 (2TB+) block devices, including RAID, disk, Network Block Device,
34 Logical Volume Manager (LVM) and loopback. 34 Logical Volume Manager (LVM) and loopback.
35 35
36 For example, RAID devices are frequently bigger than the capacity 36 This option also enables support for single files larger than
37 of the largest individual hard drive. 37 2TB.
38
39 This option is not required if you have individual disk drives
40 which total 2TB+ and you are not aggregating the capacity into
41 a large block device (e.g. using RAID or LVM).
42 38
43 If unsure, say N. 39 If unsure, say N.
44 40
@@ -58,15 +54,6 @@ config BLK_DEV_IO_TRACE
58 54
59 If unsure, say N. 55 If unsure, say N.
60 56
61config LSF
62 bool "Support for Large Single Files"
63 depends on !64BIT
64 help
65 Say Y here if you want to be able to handle very large files (2TB
66 and larger), otherwise say N.
67
68 If unsure, say Y.
69
70config BLK_DEV_BSG 57config BLK_DEV_BSG
71 bool "Block layer SG support v4 (EXPERIMENTAL)" 58 bool "Block layer SG support v4 (EXPERIMENTAL)"
72 depends on EXPERIMENTAL 59 depends on EXPERIMENTAL
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index e4a241c65db..04158ad74db 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -1721,7 +1721,7 @@ static loff_t ext4_max_size(int blkbits, int has_huge_files)
1721 /* small i_blocks in vfs inode? */ 1721 /* small i_blocks in vfs inode? */
1722 if (!has_huge_files || sizeof(blkcnt_t) < sizeof(u64)) { 1722 if (!has_huge_files || sizeof(blkcnt_t) < sizeof(u64)) {
1723 /* 1723 /*
1724 * CONFIG_LSF is not enabled implies the inode 1724 * CONFIG_LBD is not enabled implies the inode
1725 * i_block represent total blocks in 512 bytes 1725 * i_block represent total blocks in 512 bytes
1726 * 32 == size of vfs inode i_blocks * 8 1726 * 32 == size of vfs inode i_blocks * 8
1727 */ 1727 */
@@ -1764,7 +1764,7 @@ static loff_t ext4_max_bitmap_size(int bits, int has_huge_files)
1764 1764
1765 if (!has_huge_files || sizeof(blkcnt_t) < sizeof(u64)) { 1765 if (!has_huge_files || sizeof(blkcnt_t) < sizeof(u64)) {
1766 /* 1766 /*
1767 * !has_huge_files or CONFIG_LSF is not enabled 1767 * !has_huge_files or CONFIG_LBD is not enabled
1768 * implies the inode i_block represent total blocks in 1768 * implies the inode i_block represent total blocks in
1769 * 512 bytes 32 == size of vfs inode i_blocks * 8 1769 * 512 bytes 32 == size of vfs inode i_blocks * 8
1770 */ 1770 */
@@ -2021,13 +2021,13 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
2021 if (has_huge_files) { 2021 if (has_huge_files) {
2022 /* 2022 /*
2023 * Large file size enabled file system can only be 2023 * Large file size enabled file system can only be
2024 * mount if kernel is build with CONFIG_LSF 2024 * mount if kernel is build with CONFIG_LBD
2025 */ 2025 */
2026 if (sizeof(root->i_blocks) < sizeof(u64) && 2026 if (sizeof(root->i_blocks) < sizeof(u64) &&
2027 !(sb->s_flags & MS_RDONLY)) { 2027 !(sb->s_flags & MS_RDONLY)) {
2028 printk(KERN_ERR "EXT4-fs: %s: Filesystem with huge " 2028 printk(KERN_ERR "EXT4-fs: %s: Filesystem with huge "
2029 "files cannot be mounted read-write " 2029 "files cannot be mounted read-write "
2030 "without CONFIG_LSF.\n", sb->s_id); 2030 "without CONFIG_LBD.\n", sb->s_id);
2031 goto failed_mount; 2031 goto failed_mount;
2032 } 2032 }
2033 } 2033 }
diff --git a/include/linux/types.h b/include/linux/types.h
index 1d98330b1f2..121f349cb7e 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -135,19 +135,14 @@ typedef __s64 int64_t;
135 * 135 *
136 * Linux always considers sectors to be 512 bytes long independently 136 * Linux always considers sectors to be 512 bytes long independently
137 * of the devices real block size. 137 * of the devices real block size.
138 *
139 * blkcnt_t is the type of the inode's block count.
138 */ 140 */
139#ifdef CONFIG_LBD 141#ifdef CONFIG_LBD
140typedef u64 sector_t; 142typedef u64 sector_t;
141#else
142typedef unsigned long sector_t;
143#endif
144
145/*
146 * The type of the inode's block count.
147 */
148#ifdef CONFIG_LSF
149typedef u64 blkcnt_t; 143typedef u64 blkcnt_t;
150#else 144#else
145typedef unsigned long sector_t;
151typedef unsigned long blkcnt_t; 146typedef unsigned long blkcnt_t;
152#endif 147#endif
153 148