From patchwork Tue Jun 7 10:24:14 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: ubifs_decompress: cannot decompress ... Date: Tue, 07 Jun 2011 00:24:14 -0000 From: Artem Bityutskiy X-Patchwork-Id: 99106 Message-Id: <1307442254.11104.75.camel@localhost> To: "Matthew L. Creech" Cc: linux-mtd@lists.infradead.org On Mon, 2011-06-06 at 15:52 -0400, Matthew L. Creech wrote: > 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)? Probably a temporary hack like this should work. diff --git a/fs/ubifs/scan.c b/fs/ubifs/scan.c index 37383e8..c709045 100644 --- a/fs/ubifs/scan.c +++ b/fs/ubifs/scan.c @@ -352,8 +352,9 @@ corrupted: ubifs_err("LEB %d scanning failed", lnum); } err = -EUCLEAN; - ubifs_scan_destroy(sleb); - return ERR_PTR(err); +// ubifs_scan_destroy(sleb); +// return ERR_PTR(err); + return sleb; error: ubifs_err("LEB %d scanning failed, error %d", lnum, err);