projects
/
lwext4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
cc9f824
)
METADATA_CSUM: ext4_extent_full.c: do checksum on all extent tree blocks.
author
ngkaho1234
<ngkaho1234@gmail.com>
Fri, 23 Oct 2015 16:09:09 +0000
(
00:09
+0800)
committer
ngkaho1234
<ngkaho1234@gmail.com>
Fri, 23 Oct 2015 16:09:09 +0000
(
00:09
+0800)
lwext4/ext4_extent_full.c
patch
|
blob
|
history
diff --git
a/lwext4/ext4_extent_full.c
b/lwext4/ext4_extent_full.c
index 914f4247ae512a9f8502246150dc79dcc966fd0b..97f40c8d55a6b32960c6e3adbe2e53079cbfe44e 100644
(file)
--- a/
lwext4/ext4_extent_full.c
+++ b/
lwext4/ext4_extent_full.c
@@
-783,6
+783,7
@@
out:
spt->ptr = 0;
} else if (bh.lb_id) {
/* If we got a sibling leaf. */
spt->ptr = 0;
} else if (bh.lb_id) {
/* If we got a sibling leaf. */
+ ext4_extent_block_csum_set(inode_ref, ext_block_hdr(&bh));
bh.dirty = true;
spt->path.p_block = ext4_idx_pblock(ix);
bh.dirty = true;
spt->path.p_block = ext4_idx_pblock(ix);
@@
-1054,6
+1055,7
@@
out:
spt->ptr = 0;
} else if (bh.lb_id) {
/* If we got a sibling leaf. */
spt->ptr = 0;
} else if (bh.lb_id) {
/* If we got a sibling leaf. */
+ ext4_extent_block_csum_set(inode_ref, ext_block_hdr(&bh));
bh.dirty = true;
spt->path.p_block = ext4_ext_pblock(ex);
bh.dirty = true;
spt->path.p_block = ext4_ext_pblock(ex);
@@
-1135,7
+1137,6
@@
static int ext4_ext_grow_indepth(struct ext4_inode_ref *inode_ref,
to_le16(ext4_ext_space_block(inode_ref));
neh->magic = to_le16(EXT4_EXTENT_MAGIC);
to_le16(ext4_ext_space_block(inode_ref));
neh->magic = to_le16(EXT4_EXTENT_MAGIC);
- ext4_extent_block_csum_set(inode_ref, neh);
/* Update top-level index: num,max,pointer */
neh = ext_inode_hdr(inode_ref->inode);
/* Update top-level index: num,max,pointer */
neh = ext_inode_hdr(inode_ref->inode);
@@
-1150,6
+1151,7
@@
static int ext4_ext_grow_indepth(struct ext4_inode_ref *inode_ref,
}
neh->depth = to_le16(to_le16(neh->depth) + 1);
}
neh->depth = to_le16(to_le16(neh->depth) + 1);
+ ext4_extent_block_csum_set(inode_ref, neh);
bh.dirty = true;
inode_ref->dirty = true;
ext4_block_set(inode_ref->fs->bdev, &bh);
bh.dirty = true;
inode_ref->dirty = true;
ext4_block_set(inode_ref->fs->bdev, &bh);