Patchwork ubifs_decompress: cannot decompress ...

login
register
mail settings
Submitter Artem Bityutskiy
Date June 7, 2011, 10:24 a.m.
Message ID <1307442254.11104.75.camel@localhost>
Download mbox | patch
Permalink /patch/99106/
State New
Headers show

Comments

Artem Bityutskiy - June 7, 2011, 10:24 a.m.
On Mon, 2011-06-06 at 15:52 -0400, Matthew L. Creech wrote:
> 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)?

Probably a temporary hack like this should work.

Patch

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);