OSDN Git Service

e2freefrag: fix "Illegal block number" errors with bigalloc file systems
authorRobin Dong <sanbai@taobao.com>
Sat, 12 Nov 2011 02:15:55 +0000 (21:15 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 12 Nov 2011 02:15:55 +0000 (21:15 -0500)
commit554bc091b7e8a24acc737ab68bc00d2e04354653
tree67907cb2542aeb5b8aaf0b94c77ef43233bf7f16
parent6d26887991cf3bb3d21c6b9b0035576527c4a27e
e2freefrag: fix "Illegal block number" errors with bigalloc file systems

After:
# mke2fs -O ^has_journal,^resize_inode,^uninit_bg,extent,meta_bg,flex_bg,bigalloc /dev/sda
# e2freefrag /dev/sda

It will report error message like:

 Illegal block number passed to ext2fs_test_block_bitmap #1732133 for block bitmap for /dev/sda
 Illegal block number passed to ext2fs_test_block_bitmap #1732134 for block bitmap for /dev/sda
 Illegal block number passed to ext2fs_test_block_bitmap #1732135 for block bitmap for /dev/sda

One bit in bitmap of bigalloc-ext4 means a cluster not a block,
therefore ext2fs_fast_test_block_bitmap2 should check cluster.

Signed-off-by: Robin Dong <sanbai@taobao.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
misc/e2freefrag.c