Check the bad block inode during block moving
parent
7f03acc619
commit
5607c6cf1f
4
bmove.c
4
bmove.c
|
@ -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
|
* Let's see if this is one which we need to relocate
|
||||||
*/
|
*/
|
||||||
if (ext2fs_test_block_bitmap2(pb->reserve, block)) {
|
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 {
|
do {
|
||||||
if (++block >= ext2fs_blocks_count(fs->super))
|
if (++block >= ext2fs_blocks_count(fs->super))
|
||||||
block = fs->super->s_first_data_block;
|
block = fs->super->s_first_data_block;
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
*
|
*
|
||||||
* TODO bigalloc compatibility
|
* TODO bigalloc compatibility
|
||||||
* TODO support undo, but not by undo_io_manager because it is VERY slow
|
* 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 check if the block mover does block_alloc_stats
|
||||||
* TODO write some tests: for inode moving (image with many files),
|
* TODO write some tests: for inode moving (image with many files),
|
||||||
* for block moving, including extent blocks (one sparse file with many extents),
|
* for block moving, including extent blocks (one sparse file with many extents),
|
||||||
|
|
Loading…
Reference in New Issue