Add journal checksum patches. Also move
[ext4-patch-queue.git] / ext4-fix-fs-corruption-with-delalloc.patch
blobb8635065428d08a44e0e3630341b60c461d9d27f
1 ext4: Fix filesystem corruption on FS mounted with delalloc
3 From: Valerie Clement <valerie.clement@bull.net>
5 This patch fixes a filesystem corruption issue when the filesystem is
6 mounted with the delalloc option and blocksize < pagesize.
8 In the mpage_put_bnr_to_bhs() function, when skipping the first blocks
9 at the beginning of the first page, pblock should not be incremented,
10 otherwise the last blocks are corrupted. When writing into blocks at the
11 end of a group, the first blocks of the following group can be corrupted.
12 In that case, we've got the error message below:
13 EXT4-fs error (device sdc1): ext4_valid_block_bitmap: Invalid block bitmap -
14 block_group = 6233, block = 51060737
16 (Issue found when using fsstress tool on ext4 FS with 1K blocksize)
18 Signed-off-by: Valerie Clement <valerie.clement@bull.net>
19 Signed-off-by: Mingming Cao <cmm@us.ibm.com>
21 ---
22 fs/mpage.c | 1 -
23 1 file changed, 1 deletion(-)
25 Index: linux-2.6.26-rc4/fs/mpage.c
26 ===================================================================
27 --- linux-2.6.26-rc4.orig/fs/mpage.c 2008-05-29 10:52:38.000000000 -0700
28 +++ linux-2.6.26-rc4/fs/mpage.c 2008-05-29 10:52:39.000000000 -0700
29 @@ -844,7 +844,6 @@ static void mpage_put_bnr_to_bhs(struct
30 if (cur_logical >= logical)
31 break;
32 cur_logical++;
33 - pblock++;
34 } while ((bh = bh->b_this_page) != head);
36 do {