Check the bad block inode during block moving

master
Vitaliy Filippov 2014-01-05 20:12:18 +00:00
parent 7f03acc619
commit 5607c6cf1f
2 changed files with 4 additions and 1 deletions

View File

@ -53,6 +53,10 @@ static int process_block(ext2_filsys fs, blk64_t *block_nr,
* Let's see if this is one which we need to relocate
*/
if (ext2fs_test_block_bitmap2(pb->reserve, block)) {
if (pb->ino == EXT2_BAD_INO) {
pb->error = EXT2_ET_BAD_BLOCK_IN_INODE_TABLE;
return BLOCK_ABORT;
}
do {
if (++block >= ext2fs_blocks_count(fs->super))
block = fs->super->s_first_data_block;

View File

@ -4,7 +4,6 @@
*
* TODO bigalloc compatibility
* TODO support undo, but not by undo_io_manager because it is VERY slow
* TODO check the bad block inode before block moving
* TODO check if the block mover does block_alloc_stats
* TODO write some tests: for inode moving (image with many files),
* for block moving, including extent blocks (one sparse file with many extents),