More patch description fixups. Standardize case.
[ext4-patch-queue.git] / ext4_large_blocksize_support.patch
blob44afb14a4846af0c6ecde8f67546c2ae1d6d828c
1 ext4: Support large blocksize up to PAGESIZE
3 From: Takashi Sato <sho@tnes.nec.co.jp>
5 This patch set supports large block size(>4k, <=64k) in ext4,
6 just enlarging the block size limit. But it is NOT possible to have 64kB
7 blocksize on ext4 without some changes to the directory handling
8 code. The reason is that an empty 64kB directory block would have a
9 rec_len == (__u16)2^16 == 0, and this would cause an error to be hit in
10 the filesystem. The proposed solution is treat 64k rec_len
11 with a an impossible value like rec_len = 0xffff to handle this.
13 The Patch-set consists of the following 2 patches.
14 [1/2] ext4: enlarge blocksize
15 - Allow blocksize up to pagesize
17 [2/2] ext4: fix rec_len overflow
18 - prevent rec_len from overflow with 64KB blocksize
20 Now on 64k page ppc64 box runs with this patch set we could create a 64k
21 block size ext4dev, and able to handle empty directory block.
23 Signed-off-by: Takashi Sato <sho@tnes.nec.co.jp>
24 Signed-off-by: Mingming Cao <cmm@us.ibm.com>
25 ---
27 fs/ext4/super.c | 5 +++++
28 include/linux/ext4_fs.h | 4 ++--
29 2 files changed, 7 insertions(+), 2 deletions(-)
32 diff --git a/fs/ext4/super.c b/fs/ext4/super.c
33 index 1ca0f54..ab7010d 100644
34 --- a/fs/ext4/super.c
35 +++ b/fs/ext4/super.c
36 @@ -1624,6 +1624,11 @@ static int ext4_fill_super (struct super_block *sb, void *data, int silent)
37 goto out_fail;
40 + if (!sb_set_blocksize(sb, blocksize)) {
41 + printk(KERN_ERR "EXT4-fs: bad blocksize %d.\n", blocksize);
42 + goto out_fail;
43 + }
46 * The ext4 superblock will not be buffer aligned for other than 1kB
47 * block sizes. We need to calculate the offset from buffer start.
48 diff --git a/include/linux/ext4_fs.h b/include/linux/ext4_fs.h
49 index 97dd409..dfe4487 100644
50 --- a/include/linux/ext4_fs.h
51 +++ b/include/linux/ext4_fs.h
52 @@ -73,8 +73,8 @@
53 * Macro-instructions used to manage several block sizes
55 #define EXT4_MIN_BLOCK_SIZE 1024
56 -#define EXT4_MAX_BLOCK_SIZE 4096
57 -#define EXT4_MIN_BLOCK_LOG_SIZE 10
58 +#define EXT4_MAX_BLOCK_SIZE 65536
59 +#define EXT4_MIN_BLOCK_LOG_SIZE 10
60 #ifdef __KERNEL__
61 # define EXT4_BLOCK_SIZE(s) ((s)->s_blocksize)
62 #else