From patchwork Fri Dec 21 03:19:56 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Theodore Ts'o X-Patchwork-Id: 207755 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 29A9A2C0093 for ; Fri, 21 Dec 2012 14:20:08 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751706Ab2LUDUF (ORCPT ); Thu, 20 Dec 2012 22:20:05 -0500 Received: from li9-11.members.linode.com ([67.18.176.11]:39653 "EHLO imap.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751516Ab2LUDUE (ORCPT ); Thu, 20 Dec 2012 22:20:04 -0500 Received: from root (helo=closure.thunk.org) by imap.thunk.org with local-esmtp (Exim 4.80) (envelope-from ) id 1Tlt9W-0004Ty-Nj; Fri, 21 Dec 2012 03:20:02 +0000 Received: by closure.thunk.org (Postfix, from userid 15806) id 89F25244358; Thu, 20 Dec 2012 22:19:56 -0500 (EST) Date: Thu, 20 Dec 2012 22:19:56 -0500 From: Theodore Ts'o To: Ext4 Developers List Cc: forrestl@synology.com Subject: Re: [PATCH 3/3] e2fsck: make sure the extent tree is consistent after bogus node in the tree Message-ID: <20121221031956.GB5014@thunk.org> References: <20121220234229.GA22476@thunk.org> <1356047023-28367-1-git-send-email-tytso@mit.edu> <1356047023-28367-3-git-send-email-tytso@mit.edu> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1356047023-28367-3-git-send-email-tytso@mit.edu> User-Agent: Mutt/1.5.21 (2010-09-15) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: tytso@thunk.org X-SA-Exim-Scanned: No (on imap.thunk.org); SAEximRunCond expanded to false Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org 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 From b4944f654cac5f70edd80d12e59bf1212047cb5d Mon Sep 17 00:00:00 2001 From: Theodore Ts'o 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" --- 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)dghQbdt?xN1aXfj>Dd!y%x7C_`dGfZ^c;Iyvq#>y1uHms+U*q{IHqkxL!&fn{BY(QC zoN_jNHJjfJreC*T{V!e_`rl!?#%`7c{}{jWuc&wU%lt|{;D5s}_AB;aA%>Do`~3Gl zjG4Ind;O-P0(>IieKlI=4YI4Ja=T