Mercurial > hg > aboriginal
annotate sources/patches/linux-fixext4.patch @ 1556:1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
author | Rob Landley <rob@landley.net> |
---|---|
date | Tue, 13 Nov 2012 07:27:25 -0600 |
parents | |
children |
rev | line source |
---|---|
1556
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
1 commit f2a09af645b762f8230e7eba7fee3b6f7e6e96e7 |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
2 Author: Yongqiang Yang <xiaoqiangnk@gmail.com> |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
3 Date: Sun Sep 23 23:16:03 2012 -0400 |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
4 |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
5 ext4: check free inode count before allocating an inode |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
6 |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
7 Recently, I ecountered some corrupted filesystems in which some |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
8 groups' free inode counts were 65535, it seemed that free inode |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
9 count was overflow. This patch teaches ext4 to check free inode |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
10 count before allocaing an inode. |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
11 |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
12 Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com> |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
13 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
14 |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
15 diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
16 index 26154b8..fa36372 100644 |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
17 --- a/fs/ext4/ialloc.c |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
18 +++ b/fs/ext4/ialloc.c |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
19 @@ -697,6 +697,15 @@ got_group: |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
20 if (!gdp) |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
21 goto fail; |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
22 |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
23 + /* |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
24 + * Check free inodes count before loading bitmap. |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
25 + */ |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
26 + if (ext4_free_inodes_count(sb, gdp) == 0) { |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
27 + if (++group == ngroups) |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
28 + group = 0; |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
29 + continue; |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
30 + } |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
31 + |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
32 brelse(inode_bitmap_bh); |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
33 inode_bitmap_bh = ext4_read_inode_bitmap(sb, group); |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
34 if (!inode_bitmap_bh) |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
35 commit 79f1ba49569e5aec919b653c55b03274c2331701 |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
36 Author: Tao Ma <boyu.mt@taobao.com> |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
37 Date: Mon Oct 22 00:34:32 2012 -0400 |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
38 |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
39 ext4: Checksum the block bitmap properly with bigalloc enabled |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
40 |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
41 In mke2fs, we only checksum the whole bitmap block and it is right. |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
42 While in the kernel, we use EXT4_BLOCKS_PER_GROUP to indicate the |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
43 size of the checksumed bitmap which is wrong when we enable bigalloc. |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
44 The right size should be EXT4_CLUSTERS_PER_GROUP and this patch fixes |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
45 it. |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
46 |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
47 Also as every caller of ext4_block_bitmap_csum_set and |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
48 ext4_block_bitmap_csum_verify pass in EXT4_BLOCKS_PER_GROUP(sb)/8, |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
49 we'd better removes this parameter and sets it in the function itself. |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
50 |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
51 Signed-off-by: Tao Ma <boyu.mt@taobao.com> |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
52 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
53 Reviewed-by: Lukas Czerner <lczerner@redhat.com> |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
54 Cc: stable@vger.kernel.org |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
55 |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
56 diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
57 index 1b50890..cf18217 100644 |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
58 --- a/fs/ext4/balloc.c |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
59 +++ b/fs/ext4/balloc.c |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
60 @@ -174,8 +174,7 @@ void ext4_init_block_bitmap(struct super_block *sb, struct buffer_head *bh, |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
61 ext4_free_inodes_set(sb, gdp, 0); |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
62 ext4_itable_unused_set(sb, gdp, 0); |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
63 memset(bh->b_data, 0xff, sb->s_blocksize); |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
64 - ext4_block_bitmap_csum_set(sb, block_group, gdp, bh, |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
65 - EXT4_BLOCKS_PER_GROUP(sb) / 8); |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
66 + ext4_block_bitmap_csum_set(sb, block_group, gdp, bh); |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
67 return; |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
68 } |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
69 memset(bh->b_data, 0, sb->s_blocksize); |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
70 @@ -212,8 +211,7 @@ void ext4_init_block_bitmap(struct super_block *sb, struct buffer_head *bh, |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
71 */ |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
72 ext4_mark_bitmap_end(num_clusters_in_group(sb, block_group), |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
73 sb->s_blocksize * 8, bh->b_data); |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
74 - ext4_block_bitmap_csum_set(sb, block_group, gdp, bh, |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
75 - EXT4_BLOCKS_PER_GROUP(sb) / 8); |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
76 + ext4_block_bitmap_csum_set(sb, block_group, gdp, bh); |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
77 ext4_group_desc_csum_set(sb, block_group, gdp); |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
78 } |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
79 |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
80 @@ -350,7 +348,7 @@ void ext4_validate_block_bitmap(struct super_block *sb, |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
81 return; |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
82 } |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
83 if (unlikely(!ext4_block_bitmap_csum_verify(sb, block_group, |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
84 - desc, bh, EXT4_BLOCKS_PER_GROUP(sb) / 8))) { |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
85 + desc, bh))) { |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
86 ext4_unlock_group(sb, block_group); |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
87 ext4_error(sb, "bg %u: bad block bitmap checksum", block_group); |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
88 return; |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
89 diff --git a/fs/ext4/bitmap.c b/fs/ext4/bitmap.c |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
90 index 5c2d181..3285aa5 100644 |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
91 --- a/fs/ext4/bitmap.c |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
92 +++ b/fs/ext4/bitmap.c |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
93 @@ -58,11 +58,12 @@ void ext4_inode_bitmap_csum_set(struct super_block *sb, ext4_group_t group, |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
94 |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
95 int ext4_block_bitmap_csum_verify(struct super_block *sb, ext4_group_t group, |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
96 struct ext4_group_desc *gdp, |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
97 - struct buffer_head *bh, int sz) |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
98 + struct buffer_head *bh) |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
99 { |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
100 __u32 hi; |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
101 __u32 provided, calculated; |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
102 struct ext4_sb_info *sbi = EXT4_SB(sb); |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
103 + int sz = EXT4_CLUSTERS_PER_GROUP(sb) / 8; |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
104 |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
105 if (!EXT4_HAS_RO_COMPAT_FEATURE(sb, |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
106 EXT4_FEATURE_RO_COMPAT_METADATA_CSUM)) |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
107 @@ -84,8 +85,9 @@ int ext4_block_bitmap_csum_verify(struct super_block *sb, ext4_group_t group, |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
108 |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
109 void ext4_block_bitmap_csum_set(struct super_block *sb, ext4_group_t group, |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
110 struct ext4_group_desc *gdp, |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
111 - struct buffer_head *bh, int sz) |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
112 + struct buffer_head *bh) |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
113 { |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
114 + int sz = EXT4_CLUSTERS_PER_GROUP(sb) / 8; |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
115 __u32 csum; |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
116 struct ext4_sb_info *sbi = EXT4_SB(sb); |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
117 |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
118 diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
119 index 78971cf..3c20de1 100644 |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
120 --- a/fs/ext4/ext4.h |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
121 +++ b/fs/ext4/ext4.h |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
122 @@ -1882,10 +1882,10 @@ int ext4_inode_bitmap_csum_verify(struct super_block *sb, ext4_group_t group, |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
123 struct buffer_head *bh, int sz); |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
124 void ext4_block_bitmap_csum_set(struct super_block *sb, ext4_group_t group, |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
125 struct ext4_group_desc *gdp, |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
126 - struct buffer_head *bh, int sz); |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
127 + struct buffer_head *bh); |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
128 int ext4_block_bitmap_csum_verify(struct super_block *sb, ext4_group_t group, |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
129 struct ext4_group_desc *gdp, |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
130 - struct buffer_head *bh, int sz); |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
131 + struct buffer_head *bh); |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
132 |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
133 /* balloc.c */ |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
134 extern void ext4_validate_block_bitmap(struct super_block *sb, |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
135 diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
136 index fa36372..4facdd2 100644 |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
137 --- a/fs/ext4/ialloc.c |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
138 +++ b/fs/ext4/ialloc.c |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
139 @@ -762,9 +762,7 @@ got: |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
140 ext4_free_group_clusters_set(sb, gdp, |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
141 ext4_free_clusters_after_init(sb, group, gdp)); |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
142 ext4_block_bitmap_csum_set(sb, group, gdp, |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
143 - block_bitmap_bh, |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
144 - EXT4_BLOCKS_PER_GROUP(sb) / |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
145 - 8); |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
146 + block_bitmap_bh); |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
147 ext4_group_desc_csum_set(sb, group, gdp); |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
148 } |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
149 ext4_unlock_group(sb, group); |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
150 diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
151 index a415465..eb1e385 100644 |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
152 --- a/fs/ext4/mballoc.c |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
153 +++ b/fs/ext4/mballoc.c |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
154 @@ -2805,8 +2805,7 @@ ext4_mb_mark_diskspace_used(struct ext4_allocation_context *ac, |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
155 } |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
156 len = ext4_free_group_clusters(sb, gdp) - ac->ac_b_ex.fe_len; |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
157 ext4_free_group_clusters_set(sb, gdp, len); |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
158 - ext4_block_bitmap_csum_set(sb, ac->ac_b_ex.fe_group, gdp, bitmap_bh, |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
159 - EXT4_BLOCKS_PER_GROUP(sb) / 8); |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
160 + ext4_block_bitmap_csum_set(sb, ac->ac_b_ex.fe_group, gdp, bitmap_bh); |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
161 ext4_group_desc_csum_set(sb, ac->ac_b_ex.fe_group, gdp); |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
162 |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
163 ext4_unlock_group(sb, ac->ac_b_ex.fe_group); |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
164 @@ -4666,8 +4665,7 @@ do_more: |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
165 |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
166 ret = ext4_free_group_clusters(sb, gdp) + count_clusters; |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
167 ext4_free_group_clusters_set(sb, gdp, ret); |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
168 - ext4_block_bitmap_csum_set(sb, block_group, gdp, bitmap_bh, |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
169 - EXT4_BLOCKS_PER_GROUP(sb) / 8); |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
170 + ext4_block_bitmap_csum_set(sb, block_group, gdp, bitmap_bh); |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
171 ext4_group_desc_csum_set(sb, block_group, gdp); |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
172 ext4_unlock_group(sb, block_group); |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
173 percpu_counter_add(&sbi->s_freeclusters_counter, count_clusters); |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
174 @@ -4811,8 +4809,7 @@ int ext4_group_add_blocks(handle_t *handle, struct super_block *sb, |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
175 mb_free_blocks(NULL, &e4b, bit, count); |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
176 blk_free_count = blocks_freed + ext4_free_group_clusters(sb, desc); |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
177 ext4_free_group_clusters_set(sb, desc, blk_free_count); |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
178 - ext4_block_bitmap_csum_set(sb, block_group, desc, bitmap_bh, |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
179 - EXT4_BLOCKS_PER_GROUP(sb) / 8); |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
180 + ext4_block_bitmap_csum_set(sb, block_group, desc, bitmap_bh); |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
181 ext4_group_desc_csum_set(sb, block_group, desc); |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
182 ext4_unlock_group(sb, block_group); |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
183 percpu_counter_add(&sbi->s_freeclusters_counter, |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
184 diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
185 index 7a75e10..47bf06a 100644 |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
186 --- a/fs/ext4/resize.c |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
187 +++ b/fs/ext4/resize.c |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
188 @@ -1212,8 +1212,7 @@ static int ext4_set_bitmap_checksums(struct super_block *sb, |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
189 bh = ext4_get_bitmap(sb, group_data->block_bitmap); |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
190 if (!bh) |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
191 return -EIO; |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
192 - ext4_block_bitmap_csum_set(sb, group, gdp, bh, |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
193 - EXT4_BLOCKS_PER_GROUP(sb) / 8); |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
194 + ext4_block_bitmap_csum_set(sb, group, gdp, bh); |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
195 brelse(bh); |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
196 |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
197 return 0; |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
198 commit ffb5387e85d528fb6d0d924abfa3fbf0fc484071 |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
199 Author: Eric Sandeen <sandeen@redhat.com> |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
200 Date: Sun Oct 28 22:24:57 2012 -0400 |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
201 |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
202 ext4: fix unjournaled inode bitmap modification |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
203 |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
204 commit 119c0d4460b001e44b41dcf73dc6ee794b98bd31 changed |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
205 ext4_new_inode() such that the inode bitmap was being modified |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
206 outside a transaction, which could lead to corruption, and was |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
207 discovered when journal_checksum found a bad checksum in the |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
208 journal during log replay. |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
209 |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
210 Nix ran into this when using the journal_async_commit mount |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
211 option, which enables journal checksumming. The ensuing |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
212 journal replay failures due to the bad checksums led to |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
213 filesystem corruption reported as the now infamous |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
214 "Apparent serious progressive ext4 data corruption bug" |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
215 |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
216 [ Changed by tytso to only call ext4_journal_get_write_access() only |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
217 when we're fairly certain that we're going to allocate the inode. ] |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
218 |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
219 I've tested this by mounting with journal_checksum and |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
220 running fsstress then dropping power; I've also tested by |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
221 hacking DM to create snapshots w/o first quiescing, which |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
222 allows me to test journal replay repeatedly w/o actually |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
223 power-cycling the box. Without the patch I hit a journal |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
224 checksum error every time. With this fix it survives |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
225 many iterations. |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
226 |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
227 Reported-by: Nix <nix@esperi.org.uk> |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
228 Signed-off-by: Eric Sandeen <sandeen@redhat.com> |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
229 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
230 Cc: stable@vger.kernel.org |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
231 |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
232 diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
233 index 4facdd2..3a100e7 100644 |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
234 --- a/fs/ext4/ialloc.c |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
235 +++ b/fs/ext4/ialloc.c |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
236 @@ -725,6 +725,10 @@ repeat_in_this_group: |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
237 "inode=%lu", ino + 1); |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
238 continue; |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
239 } |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
240 + BUFFER_TRACE(inode_bitmap_bh, "get_write_access"); |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
241 + err = ext4_journal_get_write_access(handle, inode_bitmap_bh); |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
242 + if (err) |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
243 + goto fail; |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
244 ext4_lock_group(sb, group); |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
245 ret2 = ext4_test_and_set_bit(ino, inode_bitmap_bh->b_data); |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
246 ext4_unlock_group(sb, group); |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
247 @@ -738,6 +742,11 @@ repeat_in_this_group: |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
248 goto out; |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
249 |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
250 got: |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
251 + BUFFER_TRACE(inode_bitmap_bh, "call ext4_handle_dirty_metadata"); |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
252 + err = ext4_handle_dirty_metadata(handle, NULL, inode_bitmap_bh); |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
253 + if (err) |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
254 + goto fail; |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
255 + |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
256 /* We may have to initialize the block bitmap if it isn't already */ |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
257 if (ext4_has_group_desc_csum(sb) && |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
258 gdp->bg_flags & cpu_to_le16(EXT4_BG_BLOCK_UNINIT)) { |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
259 @@ -771,11 +780,6 @@ got: |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
260 goto fail; |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
261 } |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
262 |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
263 - BUFFER_TRACE(inode_bitmap_bh, "get_write_access"); |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
264 - err = ext4_journal_get_write_access(handle, inode_bitmap_bh); |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
265 - if (err) |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
266 - goto fail; |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
267 - |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
268 BUFFER_TRACE(group_desc_bh, "get_write_access"); |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
269 err = ext4_journal_get_write_access(handle, group_desc_bh); |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
270 if (err) |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
271 @@ -823,11 +827,6 @@ got: |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
272 } |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
273 ext4_unlock_group(sb, group); |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
274 |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
275 - BUFFER_TRACE(inode_bitmap_bh, "call ext4_handle_dirty_metadata"); |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
276 - err = ext4_handle_dirty_metadata(handle, NULL, inode_bitmap_bh); |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
277 - if (err) |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
278 - goto fail; |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
279 - |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
280 BUFFER_TRACE(group_desc_bh, "call ext4_handle_dirty_metadata"); |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
281 err = ext4_handle_dirty_metadata(handle, NULL, group_desc_bh); |
1a5d8dbc5a19
John Spencer reported ext4 filesystem corruption, which seems to have been a problem in the kernel since 3.6.3. Backporting a few patches to try to address it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
282 if (err) |