You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
147 lines
4.8 KiB
147 lines
4.8 KiB
16 years ago
|
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
|
||
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
|
||
|
#
|
||
|
# Filename: package/.../linux26/linux-2.6.git-b3a6ffe16b5cc48abe7db8d04882dc45280eb693.patch
|
||
|
# Copyright (C) 2009 The OpenSDE Project
|
||
|
#
|
||
|
# More information can be found in the files COPYING and README.
|
||
|
#
|
||
|
# This patch file is dual-licensed. It is available under the license the
|
||
|
# patched project is licensed under, as long as it is an OpenSource license
|
||
|
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
|
||
|
# of the GNU General Public License as published by the Free Software
|
||
|
# Foundation; either version 2 of the License, or (at your option) any later
|
||
|
# version.
|
||
|
# --- SDE-COPYRIGHT-NOTE-END ---
|
||
|
|
||
|
From: Jens Axboe <jens.axboe@oracle.com>
|
||
|
Date: Fri, 12 Dec 2008 08:51:16 +0000 (+0100)
|
||
|
Subject: Get rid of CONFIG_LSF
|
||
|
X-Git-Tag: v2.6.29-rc1~569^2~7
|
||
|
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=b3a6ffe16b5cc48abe7db8d04882dc45280eb693
|
||
|
|
||
|
Get rid of CONFIG_LSF
|
||
|
|
||
|
We have two seperate config entries for large devices/files. One
|
||
|
is CONFIG_LBD that guards just the devices, the other is CONFIG_LSF
|
||
|
that handles large files. This doesn't make a lot of sense, you typically
|
||
|
want both or none. So get rid of CONFIG_LSF and change CONFIG_LBD wording
|
||
|
to indicate that it covers both.
|
||
|
|
||
|
Acked-by: Jean Delvare <khali@linux-fr.org>
|
||
|
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
|
||
|
---
|
||
|
|
||
|
diff --git a/block/Kconfig b/block/Kconfig
|
||
|
index 290b219..ac0956f 100644
|
||
|
--- a/block/Kconfig
|
||
|
+++ b/block/Kconfig
|
||
|
@@ -24,21 +24,17 @@ menuconfig BLOCK
|
||
|
if BLOCK
|
||
|
|
||
|
config LBD
|
||
|
- bool "Support for Large Block Devices"
|
||
|
+ bool "Support for large block devices and files"
|
||
|
depends on !64BIT
|
||
|
help
|
||
|
- Enable block devices of size 2TB and larger.
|
||
|
+ Enable block devices or files of size 2TB and larger.
|
||
|
|
||
|
This option is required to support the full capacity of large
|
||
|
(2TB+) block devices, including RAID, disk, Network Block Device,
|
||
|
Logical Volume Manager (LVM) and loopback.
|
||
|
-
|
||
|
- For example, RAID devices are frequently bigger than the capacity
|
||
|
- of the largest individual hard drive.
|
||
|
-
|
||
|
- This option is not required if you have individual disk drives
|
||
|
- which total 2TB+ and you are not aggregating the capacity into
|
||
|
- a large block device (e.g. using RAID or LVM).
|
||
|
+
|
||
|
+ This option also enables support for single files larger than
|
||
|
+ 2TB.
|
||
|
|
||
|
If unsure, say N.
|
||
|
|
||
|
@@ -58,15 +54,6 @@ config BLK_DEV_IO_TRACE
|
||
|
|
||
|
If unsure, say N.
|
||
|
|
||
|
-config LSF
|
||
|
- bool "Support for Large Single Files"
|
||
|
- depends on !64BIT
|
||
|
- help
|
||
|
- Say Y here if you want to be able to handle very large files (2TB
|
||
|
- and larger), otherwise say N.
|
||
|
-
|
||
|
- If unsure, say Y.
|
||
|
-
|
||
|
config BLK_DEV_BSG
|
||
|
bool "Block layer SG support v4 (EXPERIMENTAL)"
|
||
|
depends on EXPERIMENTAL
|
||
|
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
|
||
|
index e4a241c..04158ad 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)
|
||
|
/* small i_blocks in vfs inode? */
|
||
|
if (!has_huge_files || sizeof(blkcnt_t) < sizeof(u64)) {
|
||
|
/*
|
||
|
- * CONFIG_LSF is not enabled implies the inode
|
||
|
+ * CONFIG_LBD is not enabled implies the inode
|
||
|
* i_block represent total blocks in 512 bytes
|
||
|
* 32 == size of vfs inode i_blocks * 8
|
||
|
*/
|
||
|
@@ -1764,7 +1764,7 @@ static loff_t ext4_max_bitmap_size(int bits, int has_huge_files)
|
||
|
|
||
|
if (!has_huge_files || sizeof(blkcnt_t) < sizeof(u64)) {
|
||
|
/*
|
||
|
- * !has_huge_files or CONFIG_LSF is not enabled
|
||
|
+ * !has_huge_files or CONFIG_LBD is not enabled
|
||
|
* implies the inode i_block represent total blocks in
|
||
|
* 512 bytes 32 == size of vfs inode i_blocks * 8
|
||
|
*/
|
||
|
@@ -2021,13 +2021,13 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
|
||
|
if (has_huge_files) {
|
||
|
/*
|
||
|
* Large file size enabled file system can only be
|
||
|
- * mount if kernel is build with CONFIG_LSF
|
||
|
+ * mount if kernel is build with CONFIG_LBD
|
||
|
*/
|
||
|
if (sizeof(root->i_blocks) < sizeof(u64) &&
|
||
|
!(sb->s_flags & MS_RDONLY)) {
|
||
|
printk(KERN_ERR "EXT4-fs: %s: Filesystem with huge "
|
||
|
"files cannot be mounted read-write "
|
||
|
- "without CONFIG_LSF.\n", sb->s_id);
|
||
|
+ "without CONFIG_LBD.\n", sb->s_id);
|
||
|
goto failed_mount;
|
||
|
}
|
||
|
}
|
||
|
diff --git a/include/linux/types.h b/include/linux/types.h
|
||
|
index 1d98330..121f349 100644
|
||
|
--- a/include/linux/types.h
|
||
|
+++ b/include/linux/types.h
|
||
|
@@ -135,19 +135,14 @@ typedef __s64 int64_t;
|
||
|
*
|
||
|
* Linux always considers sectors to be 512 bytes long independently
|
||
|
* of the devices real block size.
|
||
|
+ *
|
||
|
+ * blkcnt_t is the type of the inode's block count.
|
||
|
*/
|
||
|
#ifdef CONFIG_LBD
|
||
|
typedef u64 sector_t;
|
||
|
-#else
|
||
|
-typedef unsigned long sector_t;
|
||
|
-#endif
|
||
|
-
|
||
|
-/*
|
||
|
- * The type of the inode's block count.
|
||
|
- */
|
||
|
-#ifdef CONFIG_LSF
|
||
|
typedef u64 blkcnt_t;
|
||
|
#else
|
||
|
+typedef unsigned long sector_t;
|
||
|
typedef unsigned long blkcnt_t;
|
||
|
#endif
|
||
|
|