Attempt recovery if the journal contains illegal blocks

bitmap-optimize
Richard Mortimer 2004-10-04 17:56:24 +01:00
parent df95e09a52
commit 6e4fbbeb50
7 changed files with 45 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2004-10-04 Richard Mortimer <richm@oldelvet.org.uk>
* journal.c (e2fsck_check_ext3_journal): Attempt recovery of the
filesystem if the journal contains illegal block numbers.
2004-07-26 Theodore Ts'o <tytso@mit.edu>
* pass1.c (process_block): Change the limit of directory size from

View File

@ -665,6 +665,7 @@ int e2fsck_check_ext3_journal(e2fsck_t ctx)
retval = e2fsck_get_journal(ctx, &journal);
if (retval) {
if ((retval == EXT2_ET_BAD_INODE_NUM) ||
(retval == EXT2_ET_BAD_BLOCK_NUM) ||
(retval == EXT2_ET_JOURNAL_TOO_SMALL) ||
(retval == EXT2_ET_NO_JOURNAL))
return e2fsck_journal_fix_bad_inode(ctx, &pctx);

View File

@ -1,3 +1,9 @@
2004-10-04 Richard Mortimer <richm@oldelvet.org.uk>
* f_badjourblks: Add test case which tests a Journal with illegal
block numbers in both the journal inode and the superblock
inode backup.
2004-09-17 Theodore Ts'o <tytso@mit.edu>
* test_script.in: Remove XSI:isms for greater portability.

View File

@ -0,0 +1,25 @@
Superblock has a bad ext3 journal (inode 8).
Clear? yes
*** ext3 journal has been deleted - filesystem is now ext2 only ***
Pass 1: Checking inodes, blocks, and sizes
Journal inode is not in use, but contains data. Clear? yes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Block bitmap differences: -(50--1079)
Fix? yes
Free blocks count wrong for group #0 (7112, counted=8142).
Fix? yes
Free blocks count wrong (7112, counted=8142).
Fix? yes
test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
test_filesys: 11/256 files (0.0% non-contiguous), 50/8192 blocks
Exit status is 1

View File

@ -0,0 +1,7 @@
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
test_filesys: 11/256 files (0.0% non-contiguous), 50/8192 blocks
Exit status is 0

Binary file not shown.

1
tests/f_badjourblks/name Normal file
View File

@ -0,0 +1 @@
Illegal blocks in journal inode (and backup in superblock)