mirror of https://github.com/vitalif/e2fsprogs
ChangeLog, pass5.c, problem.c, problem.h:
pass5.c (check_block_bitmaps, check_inode_bitmaps): Add error checking for a "should never happen case". problem.c, problem.h (PR_5_COPY_IBITMAP_ERROR, PR_5_COPY_BBITMAP_ERROR): Add new error codes.bitmap-optimize
parent
3e025efc0f
commit
bbd47d76b7
|
@ -1,3 +1,11 @@
|
||||||
|
2000-06-10 Theodore Ts'o <tytso@valinux.com>
|
||||||
|
|
||||||
|
* pass5.c (check_block_bitmaps, check_inode_bitmaps): Add error
|
||||||
|
checking for a "should never happen case".
|
||||||
|
|
||||||
|
* problem.c, problem.h (PR_5_COPY_IBITMAP_ERROR,
|
||||||
|
PR_5_COPY_BBITMAP_ERROR): Add new error codes.
|
||||||
|
|
||||||
2000-05-27 Theodore Ts'o <tytso@valinux.com>
|
2000-05-27 Theodore Ts'o <tytso@valinux.com>
|
||||||
|
|
||||||
* pass1.c (pass1, check_size): Apply patch from Chris Wedgewood
|
* pass1.c (pass1, check_size): Apply patch from Chris Wedgewood
|
||||||
|
|
|
@ -175,7 +175,12 @@ redo_counts:
|
||||||
ext2fs_free_block_bitmap(fs->block_map);
|
ext2fs_free_block_bitmap(fs->block_map);
|
||||||
retval = ext2fs_copy_bitmap(ctx->block_found_map,
|
retval = ext2fs_copy_bitmap(ctx->block_found_map,
|
||||||
&fs->block_map);
|
&fs->block_map);
|
||||||
/* XXX check retval --- should never fail! */
|
if (retval) {
|
||||||
|
clear_problem_context(&pctx);
|
||||||
|
fix_problem(ctx, PR_5_COPY_BBITMAP_ERROR, &pctx);
|
||||||
|
ctx->flags |= E2F_FLAG_ABORT;
|
||||||
|
return;
|
||||||
|
}
|
||||||
ext2fs_set_bitmap_padding(fs->block_map);
|
ext2fs_set_bitmap_padding(fs->block_map);
|
||||||
ext2fs_mark_bb_dirty(fs);
|
ext2fs_mark_bb_dirty(fs);
|
||||||
|
|
||||||
|
@ -324,7 +329,12 @@ do_counts:
|
||||||
ext2fs_free_inode_bitmap(fs->inode_map);
|
ext2fs_free_inode_bitmap(fs->inode_map);
|
||||||
retval = ext2fs_copy_bitmap(ctx->inode_used_map,
|
retval = ext2fs_copy_bitmap(ctx->inode_used_map,
|
||||||
&fs->inode_map);
|
&fs->inode_map);
|
||||||
/* XXX check retval --- should never fail! */
|
if (retval) {
|
||||||
|
clear_problem_context(&pctx);
|
||||||
|
fix_problem(ctx, PR_5_COPY_IBITMAP_ERROR, &pctx);
|
||||||
|
ctx->flags |= E2F_FLAG_ABORT;
|
||||||
|
return;
|
||||||
|
}
|
||||||
ext2fs_set_bitmap_padding(fs->inode_map);
|
ext2fs_set_bitmap_padding(fs->inode_map);
|
||||||
ext2fs_mark_ib_dirty(fs);
|
ext2fs_mark_ib_dirty(fs);
|
||||||
|
|
||||||
|
|
|
@ -981,7 +981,17 @@ static const struct e2fsck_problem problem_table[] = {
|
||||||
{ PR_5_FUDGE_BITMAP_ERROR,
|
{ PR_5_FUDGE_BITMAP_ERROR,
|
||||||
N_("Internal error: fudging end of bitmap (%N)\n"),
|
N_("Internal error: fudging end of bitmap (%N)\n"),
|
||||||
PROMPT_NONE, PR_FATAL },
|
PROMPT_NONE, PR_FATAL },
|
||||||
|
|
||||||
|
/* Error copying in replacement inode bitmap */
|
||||||
|
{ PR_5_COPY_IBITMAP_ERROR,
|
||||||
|
"Error copying in replacement @i @B: %m\n",
|
||||||
|
PROMPT_NONE, PR_FATAL },
|
||||||
|
|
||||||
|
/* Error copying in replacement block bitmap */
|
||||||
|
{ PR_5_COPY_BBITMAP_ERROR,
|
||||||
|
"Error copying in replacement @b @B: %m\n",
|
||||||
|
PROMPT_NONE, PR_FATAL },
|
||||||
|
|
||||||
{ 0 }
|
{ 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -587,10 +587,16 @@ struct problem_context {
|
||||||
|
|
||||||
/* Programming error: bitmap endpoints don't match */
|
/* Programming error: bitmap endpoints don't match */
|
||||||
#define PR_5_BMAP_ENDPOINTS 0x050010
|
#define PR_5_BMAP_ENDPOINTS 0x050010
|
||||||
|
|
||||||
/* Internal error: fudging end of bitmap */
|
/* Internal error: fudging end of bitmap */
|
||||||
#define PR_5_FUDGE_BITMAP_ERROR 0x050011
|
#define PR_5_FUDGE_BITMAP_ERROR 0x050011
|
||||||
|
|
||||||
|
/* Error copying in replacement inode bitmap */
|
||||||
|
#define PR_5_COPY_IBITMAP_ERROR 0x050012
|
||||||
|
|
||||||
|
/* Error copying in replacement block bitmap */
|
||||||
|
#define PR_5_COPY_BBITMAP_ERROR 0x050013
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Function declarations
|
* Function declarations
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue