linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: "Matthew L. Creech" <mlcreech@gmail.com>
To: linux-mtd@lists.infradead.org
Cc: dedekind1@gmail.com
Subject: Re: ubifs_decompress: cannot decompress ...
Date: Mon,  6 Jun 2011 15:52:06 -0400	[thread overview]
Message-ID: <1307389926-12209-1-git-send-email-mlcreech@gmail.com> (raw)
In-Reply-To: <1307377091.3112.100.camel@localhost>

On Mon, Jun 6, 2011 at 12:18 PM, Artem Bityutskiy <dedekind1@gmail.com> 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 <mlcreech@gmail.com>
---
 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;
 	}
 
-- 
1.6.3.3

  reply	other threads:[~2011-06-06 19:52 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-27 21:12 ubifs_decompress: cannot decompress Matthew L. Creech
2011-05-30 12:29 ` Ben Gardiner
2011-05-31 15:47   ` Matthew L. Creech
2011-05-31 16:10     ` Ben Gardiner
2011-05-31 21:47       ` Matthew L. Creech
2011-06-01  7:51         ` Artem Bityutskiy
2011-06-02  4:30           ` Matthew L. Creech
2011-06-02 18:59             ` Matthew L. Creech
2011-06-06  9:58               ` Artem Bityutskiy
2011-06-06 16:04                 ` Matthew L. Creech
2011-06-06 16:18                   ` Artem Bityutskiy
2011-06-06 19:52                     ` Matthew L. Creech [this message]
2011-06-07  4:34                       ` Artem Bityutskiy
2011-06-07 20:41                         ` Matthew L. Creech
2011-06-08 14:11                           ` Artem Bityutskiy
2011-06-08 17:50                             ` Matthew L. Creech
2011-06-09 12:10                               ` Artem Bityutskiy
2011-06-20 15:35                                 ` Matthew L. Creech
2011-06-07 10:24                       ` Artem Bityutskiy
2011-06-03  4:32             ` Artem Bityutskiy
2011-06-01  8:02     ` Artem Bityutskiy
2011-06-01  8:07       ` Artem Bityutskiy
2011-06-01  8:39       ` Artem Bityutskiy
2011-06-02  4:34       ` Matthew L. Creech
2011-06-01  7:48 ` Artem Bityutskiy

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=1307389926-12209-1-git-send-email-mlcreech@gmail.com \
    --to=mlcreech@gmail.com \
    --cc=dedekind1@gmail.com \
    --cc=linux-mtd@lists.infradead.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).