]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
ext4: Checksum the block bitmap properly with bigalloc enabled
authorTao Ma <boyu.mt@taobao.com>
Mon, 22 Oct 2012 04:34:32 +0000 (00:34 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 28 Oct 2012 17:56:09 +0000 (10:56 -0700)
commit462f4e60ea80fc6d82b872243c4d11a9f8286d0d
treeaceb3fe467fd3de4e5e4cefdc446c56f6e15186d
parente28b27be06c5e6a5236c0c0b370ca0768ab086bb
ext4: Checksum the block bitmap properly with bigalloc enabled

commit 79f1ba49569e5aec919b653c55b03274c2331701 upstream.

In mke2fs, we only checksum the whole bitmap block and it is right.
While in the kernel, we use EXT4_BLOCKS_PER_GROUP to indicate the
size of the checksumed bitmap which is wrong when we enable bigalloc.
The right size should be EXT4_CLUSTERS_PER_GROUP and this patch fixes
it.

Also as every caller of ext4_block_bitmap_csum_set and
ext4_block_bitmap_csum_verify pass in EXT4_BLOCKS_PER_GROUP(sb)/8,
we'd better removes this parameter and sets it in the function itself.

Signed-off-by: Tao Ma <boyu.mt@taobao.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Reviewed-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ext4/balloc.c
fs/ext4/bitmap.c
fs/ext4/ext4.h
fs/ext4/ialloc.c
fs/ext4/mballoc.c
fs/ext4/resize.c