Skip to content

Commit

Permalink
UBIFS: improve error reporting when reading bad node
Browse files Browse the repository at this point in the history
When an error happens during validation of read node, the typical situation is that
the LEB we read is unmapped (due to some bug). It is handy to include the mapping
status into the error message.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
  • Loading branch information
Artem Bityutskiy authored and Artem Bityutskiy committed Aug 30, 2010
1 parent 3bb66b4 commit 3a8fa0e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/ubifs/io.c
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,8 @@ int ubifs_read_node(const struct ubifs_info *c, void *buf, int type, int len,
return 0;

out:
ubifs_err("bad node at LEB %d:%d", lnum, offs);
ubifs_err("bad node at LEB %d:%d, LEB mapping status %d", lnum, offs,
ubi_is_mapped(c->ubi, lnum));
dbg_dump_node(c, buf);
dbg_dump_stack();
return -EINVAL;
Expand Down

0 comments on commit 3a8fa0e

Please sign in to comment.