]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
Don't offer to update or clone the resize inode when e2fsck deals with
authorTheodore Ts'o <tytso@mit.edu>
Thu, 14 Apr 2005 21:10:14 +0000 (17:10 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 14 Apr 2005 21:10:14 +0000 (17:10 -0400)
multiply claimed blocks.

TODO
e2fsck/ChangeLog
e2fsck/pass1b.c
tests/ChangeLog
tests/f_dup_resize/expect.1 [new file with mode: 0644]
tests/f_dup_resize/expect.2 [new file with mode: 0644]
tests/f_dup_resize/name [new file with mode: 0644]
tests/f_dup_resize/script [new file with mode: 0644]

diff --git a/TODO b/TODO
index a6d4792998e63162c283fe5aac9f9edc35e7d121..07077504f5b5763e717a50e36420da90851d7d6f 100644 (file)
--- a/TODO
+++ b/TODO
@@ -276,3 +276,9 @@ cleanliness.  (I will probably have to do this myself -- Ted)
 extent maps first/in parallel. 
 
        Difficulty: High        Priority: Medium
+
+----------------------------------
+
+Need to deal with the case where the resize inode overlaps with the
+bad blocks inode.
+
index 731762870f71dcdab66e0887224af50d3f66079b..75979ec9357fe14e9824caeb6d7dd4eb97d0ee30 100644 (file)
@@ -1,5 +1,8 @@
 2005-04-14  Theodore Ts'o  <tytso@mit.edu>
 
+       * pass1b.c (pass1d): Don't offer to clone or delete the resize
+               inode; it's not allowed!
+
        * e2fsck.c, e2fsck.h, journal.c, pass1.c, pass1b.c, pass2.c,
                pass3.c, pass4.c, super.c, unix.c: Use a centrally stored
                current time for "now" which can be overridden using the
index 733c0274d8a936323bcb59aa86534664c3aea2b1..23a54d82450aeddd8e064e3edc747d1cb8654feb 100644 (file)
@@ -432,7 +432,7 @@ static void pass1d(e2fsck_t ctx, char *block_buf)
                shared_len = 0;
                file_ok = 1;
                ino = (ext2_ino_t)VOIDPTR_TO_INT(dnode_getkey(n));
-               if (ino == EXT2_BAD_INO)
+               if (ino == EXT2_BAD_INO || ino == EXT2_RESIZE_INO)
                        continue;
 
                /*
index fad3aa3779d2663eb1088a550bb6d838986eeb5d..a1819f1e2d6448403332a27b20546a41113e5e2f 100644 (file)
@@ -1,3 +1,7 @@
+2005-04-14  Theodore Ts'o  <tytso@mit.edu>
+
+       * f_dup_resize: New test case
+
 2005-04-09  Theodore Ts'o  <tytso@mit.edu>
 
        * test_script.in: Make the test script driver exit with a non-zero
diff --git a/tests/f_dup_resize/expect.1 b/tests/f_dup_resize/expect.1
new file mode 100644 (file)
index 0000000..2fa92a7
--- /dev/null
@@ -0,0 +1,33 @@
+Resize inode not valid.  Recreate? yes
+
+Pass 1: Checking inodes, blocks, and sizes
+Duplicate blocks found... invoking duplicate block passes.
+Pass 1B: Rescan for duplicate/bad blocks
+Duplicate/bad block(s) in inode 7: 4 5 6 7
+Duplicate/bad block(s) in inode 12: 4 5 6 7
+Pass 1C: Scan directories for inodes with dup blocks.
+Pass 1D: Reconciling duplicate blocks
+(There are 1 inodes containing duplicate/bad blocks.)
+
+File /debugfs (inode #12, mod time Mon Apr 11 00:00:00 2005) 
+  has 4 duplicate block(s), shared with 1 file(s):
+       <The group descriptor inode> (inode #7, mod time Mon Apr 11 06:13:20 2005)
+Clone duplicate/bad blocks? 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:  +(8195--8198)
+Fix? yes
+
+Free blocks count wrong for group #0 (7910, counted=7911).
+Fix? yes
+
+Free blocks count wrong (9754, counted=9755).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 12/2560 files (8.3% non-contiguous), 485/10240 blocks
+Exit status is 1
diff --git a/tests/f_dup_resize/expect.2 b/tests/f_dup_resize/expect.2
new file mode 100644 (file)
index 0000000..ed116f4
--- /dev/null
@@ -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: 12/2560 files (16.7% non-contiguous), 485/10240 blocks
+Exit status is 0
diff --git a/tests/f_dup_resize/name b/tests/f_dup_resize/name
new file mode 100644 (file)
index 0000000..6c5befa
--- /dev/null
@@ -0,0 +1 @@
+blocks claimed by the resize inode and another inode
diff --git a/tests/f_dup_resize/script b/tests/f_dup_resize/script
new file mode 100644 (file)
index 0000000..969761a
--- /dev/null
@@ -0,0 +1,18 @@
+SKIP_GUNZIP="true"
+
+touch $TMPFILE
+mke2fs -F -O resize_inode $TMPFILE 10240 > /dev/null 2>&1
+debugfs -w $TMPFILE << "EOF" > /dev/null 2>&1
+freeb 4 4
+freeb 8195 4
+write /sbin/debugfs debugfs
+set_inode_field debugfs mtime 200504110000
+q
+EOF
+
+E2FSCK_TIME=1113200000
+export E2FSCK_TIME
+
+. $cmd_dir/run_e2fsck
+
+unset E2FSCK_TIME