From: Theodore Ts'o <tytso@mit.edu>
To: Ext4 Developers List <linux-ext4@vger.kernel.org>
Cc: forrestl@synology.com
Subject: Re: [PATCH 3/3] e2fsck: make sure the extent tree is consistent after bogus node in the tree
Date: Thu, 20 Dec 2012 22:19:56 -0500 [thread overview]
Message-ID: <20121221031956.GB5014@thunk.org> (raw)
In-Reply-To: <1356047023-28367-3-git-send-email-tytso@mit.edu>
[-- Attachment #1: Type: text/plain, Size: 1006 bytes --]
And here is the test case....
BTW, #protip: You can use the split_node command in tst_extents
debugging program not only to perform node splits (which will make the
tree wider), but if you try splitting at the root node, it will
allocate a new extent tree block, and then move all of the extent tree
nodes at the top-level, in the inode, into the new exterior extent
tree block. In effect, this will make the tree deeper.
This should allow you to make fairly arbitrarily deep and complex
extent trees by hand, without having to resort to using fallocate and
punch hole commands, which tend to take a lot longer than using the
"insert_extent", "replace_extent", and "split_node" commands in
tst_extent when creating test cases.
This also makes it easier to create small test file system images so
we don't have to bloat the e2fsprogs source tree with huge test file
systems in our regression test suite (which also tend to very much
slow down running said regression test suite).
Regards,
- Ted
[-- Attachment #2: 0001-tests-add-test-of-an-incorrect-interior-node-in-an-e.patch --]
[-- Type: text/x-diff, Size: 3289 bytes --]
>From b4944f654cac5f70edd80d12e59bf1212047cb5d Mon Sep 17 00:00:00 2001
From: Theodore Ts'o <tytso@mit.edu>
Date: Thu, 20 Dec 2012 21:48:08 -0500
Subject: [PATCH] tests: add test of an incorrect interior node in an extent
tree
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
---
tests/f_extent_interior_start_lblk/expect.1 | 12 ++++++++++++
tests/f_extent_interior_start_lblk/expect.2 | 7 +++++++
tests/f_extent_interior_start_lblk/image.gz | Bin 0 -> 603 bytes
tests/f_extent_interior_start_lblk/name | 1 +
4 files changed, 20 insertions(+)
create mode 100644 tests/f_extent_interior_start_lblk/expect.1
create mode 100644 tests/f_extent_interior_start_lblk/expect.2
create mode 100644 tests/f_extent_interior_start_lblk/image.gz
create mode 100644 tests/f_extent_interior_start_lblk/name
diff --git a/tests/f_extent_interior_start_lblk/expect.1 b/tests/f_extent_interior_start_lblk/expect.1
new file mode 100644
index 0000000..f5b7d46
--- /dev/null
+++ b/tests/f_extent_interior_start_lblk/expect.1
@@ -0,0 +1,12 @@
+Pass 1: Checking inodes, blocks, and sizes
+Interior extent node level 0 of inode 12:
+Logical start 0 does not match logical start 2 at next level. Fix? yes
+
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 12/16 files (0.0% non-contiguous), 29/100 blocks
+Exit status is 1
diff --git a/tests/f_extent_interior_start_lblk/expect.2 b/tests/f_extent_interior_start_lblk/expect.2
new file mode 100644
index 0000000..06c6082
--- /dev/null
+++ b/tests/f_extent_interior_start_lblk/expect.2
@@ -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/16 files (0.0% non-contiguous), 29/100 blocks
+Exit status is 0
diff --git a/tests/f_extent_interior_start_lblk/image.gz b/tests/f_extent_interior_start_lblk/image.gz
new file mode 100644
index 0000000000000000000000000000000000000000..0ed71286b308bbe1f2f5e26af1b965c3ace3ed1d
GIT binary patch
literal 603
zc-oWi=HSpjdpUrKIWspgJ(c0@o!wa?ff5W4j5kX!_Ec~a-XO?xFxyEfOo^q_m&;Ks
zBtR#}Nvn|CH&O9O`wjIEmo)Y@D5|vfE)dghQb<Z(9+8o_ecop4kDE9<q*71T$^WVT
zH+SyMopb*ioSh@kkhj(NSWM46iOq(m3^&P#-?-kj<=%&^y+&WR#BnaXXz|-Hd)@V4
z_cm>dt?xN1aXfj>Dd!y%x7C_`dGfZ^c<Zf`w|4JdFaIvrzHen~^8Y_E`unSj|J{3h
z^WUvgpMP)Hw|(Jx+&bWo*`_alZOnqV9o$sX>;Iyvq#>y1uHms+U*q{IH<z#bdU<w#
zjN*-5QoZ*+)NPnrpUH4nCEt!Y{bx!}bmcsMzism#wmZkyEv<U{>qkxL!&fn{BY(QC
zoN_jNHJjfJreC*T{V!e_`rl!?#%`7c{}{jWuc&wU%lt|{;D5s}_AB;aA%>Do`~3Gl
zjG4Ind;O-P0(>I<ESmNbw{u<VG`8(^t+Uv6yZetvPPxd>ieKlI=4YI4Ja<Xr3!h1e
zwz2{P3MiR3acNbm?!V`C_Gfhbm!EVy7WR7TMWsuhp1uq!wwq*f+C%J;jp|MR%Tt!7
zF4KLSuY0dc-u?8`uYc{ef8C!iT~uj(@08E3|I)qnl{bQW>=T<mrYpFeS9|l{?^V69
tV$ZhT`j!9R#+d(0y}#}DSLxpsl~w;;%cU470zam%=UrX*gkb_B0|0Xv5#0a)
literal 0
Hc-jL100001
diff --git a/tests/f_extent_interior_start_lblk/name b/tests/f_extent_interior_start_lblk/name
new file mode 100644
index 0000000..fbd5f58
--- /dev/null
+++ b/tests/f_extent_interior_start_lblk/name
@@ -0,0 +1 @@
+incorrect starting lblk in an interior node
--
1.7.12.rc0.22.gcdd159b
next prev parent reply other threads:[~2012-12-21 3:20 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-13 15:32 [PATCH] ext4: fix extent tree corruption that incurred by hole punch [V2] Forrest Liu
2012-12-13 16:04 ` Forrest Liu
2012-12-13 16:17 ` Forrest Liu
2012-12-14 17:18 ` Eric Sandeen
2012-12-17 4:25 ` Ashish Sangwan
2012-12-20 5:39 ` Theodore Ts'o
2012-12-20 15:11 ` Forrest Liu
2012-12-20 23:42 ` Theodore Ts'o
2012-12-20 23:43 ` [PATCH 1/3] e2fsck: fix incorrect interior node logical start values Theodore Ts'o
2012-12-20 23:43 ` [PATCH 2/3] libext2fs: ext2fs_extents_fix_parents() should not modify the handle location Theodore Ts'o
2012-12-20 23:43 ` [PATCH 3/3] e2fsck: make sure the extent tree is consistent after bogus node in the tree Theodore Ts'o
2012-12-21 3:19 ` Theodore Ts'o [this message]
2012-12-21 11:02 ` Forrest Liu
2012-12-21 15:34 ` Eric Sandeen
2012-12-21 20:47 ` [PATCH 1/3] e2fsck: fix incorrect interior node logical start values Eric Sandeen
2012-12-24 14:57 ` Theodore Ts'o
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20121221031956.GB5014@thunk.org \
--to=tytso@mit.edu \
--cc=forrestl@synology.com \
--cc=linux-ext4@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).