From patchwork Mon Jun 6 19:52:06 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Matthew L. Creech" X-Patchwork-Id: 99019 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 11D20B6FA4 for ; Tue, 7 Jun 2011 05:52:34 +1000 (EST) Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QTfqX-000347-Qx; Mon, 06 Jun 2011 19:52:21 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QTfqX-00057J-C7; Mon, 06 Jun 2011 19:52:21 +0000 Received: from mail-yx0-f177.google.com ([209.85.213.177]) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QTfqU-00056v-EB for linux-mtd@lists.infradead.org; Mon, 06 Jun 2011 19:52:19 +0000 Received: by yxk30 with SMTP id 30so560519yxk.36 for ; Mon, 06 Jun 2011 12:52:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references; bh=ZkjjxRC4MdJHvz7OSWxgPqhZSIjppMHJwg7gbvWndwM=; b=X6BvQRepqtoOwn7lf9JtlpNmQx5btgq+R4RMiw77sojmThfOqD0JWEx9PA9Y3eDZMH 7CyXMaZUnJyoobLHKqbT9Ye6hCcGgtgAAlPKWDHoSDJTfczQ10TGJ+SgEsO+eudP1RLt i0gRuPiEynys9fxke1bTUI8+40UydgMjHFyig= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=nKvRu56iHVGfuqTqp8pg2YC0O1nR+joJNHc7vk5ay05pL6O+N6whz5SubLvUUhIVYc dxeDq08HNZT8GFsaIzUPLCZf4J1FNMuFsHp9anQToaDtudBQgS462Cfqj8zEv3HkF00G qZMftZFsxzQ/F1QAirEZnEje+mSby+NC4BRrM= Received: by 10.236.153.34 with SMTP id e22mr6709006yhk.31.1307389935566; Mon, 06 Jun 2011 12:52:15 -0700 (PDT) Received: from localhost.localdomain (mcreech.com [74.207.224.132]) by mx.google.com with ESMTPS id e24sm2144283yhk.65.2011.06.06.12.52.14 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 06 Jun 2011 12:52:15 -0700 (PDT) From: "Matthew L. Creech" To: linux-mtd@lists.infradead.org Subject: Re: ubifs_decompress: cannot decompress ... Date: Mon, 6 Jun 2011 15:52:06 -0400 Message-Id: <1307389926-12209-1-git-send-email-mlcreech@gmail.com> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <1307377091.3112.100.camel@localhost> References: <1307377091.3112.100.camel@localhost> X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110606_155218_666577_B6220B0D X-CRM114-Status: GOOD ( 15.77 ) X-Spam-Score: -0.8 (/) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-0.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.213.177 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is freemail (mlcreech[at]gmail.com) -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.0 RFC_ABUSE_POST Both abuse and postmaster missing on sender domain 0.0 T_TO_NO_BRKTS_FREEMAIL T_TO_NO_BRKTS_FREEMAIL Cc: dedekind1@gmail.com X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org On Mon, Jun 6, 2011 at 12:18 PM, Artem Bityutskiy wrote: > > I have to go home now - could you please improve dbg_dump_leb(). > Currently it calls ubifs_scan(), which scans, finds corrupted node, > prints corruption information and returns -EUCLEAN and destroys the > scanned data. > Will something like this be okay? Or do you still want to dump the partially-parsed data from the corrupt node as well (not just the raw contents of the LEB)? Currently an error in ubifs_scan() will cause dbg_dump_leb() to abort without completing the dump. Instead, we should abandon parsing the data, but dump the raw (uninterpreted) LEB contents instead. Signed-off-by: Matthew L. Creech --- fs/ubifs/debug.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/fs/ubifs/debug.c b/fs/ubifs/debug.c index 26d4c61..6ab43e4 100644 --- a/fs/ubifs/debug.c +++ b/fs/ubifs/debug.c @@ -901,6 +901,9 @@ void dbg_dump_leb(const struct ubifs_info *c, int lnum) sleb = ubifs_scan(c, lnum, 0, buf, 0); if (IS_ERR(sleb)) { ubifs_err("scan error %d", (int)PTR_ERR(sleb)); + printk(KERN_DEBUG "\tLEB data buffer:\n"); + print_hex_dump(KERN_DEBUG, "\t", DUMP_PREFIX_OFFSET, 32, 1, + buf, c->leb_size, 0); goto out; }