aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2010-08-22 14:27:30 -0400
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2010-08-30 03:19:09 -0400
commit3a8fa0ed3e1a8dc54f9297d2a2292b87e03e21b5 (patch)
tree395e9ea22dda9361867afdfc5588a932530b1c10 /fs
parent3bb66b47a4268a4419594b4c4aec58dbeb6b58d2 (diff)
UBIFS: improve error reporting when reading bad node
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>
Diffstat (limited to 'fs')
-rw-r--r--fs/ubifs/io.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/ubifs/io.c b/fs/ubifs/io.c
index bcf5a16f30bb..9432431bf595 100644
--- a/fs/ubifs/io.c
+++ b/fs/ubifs/io.c
@@ -815,7 +815,8 @@ int ubifs_read_node(const struct ubifs_info *c, void *buf, int type, int len,
815 return 0; 815 return 0;
816 816
817out: 817out:
818 ubifs_err("bad node at LEB %d:%d", lnum, offs); 818 ubifs_err("bad node at LEB %d:%d, LEB mapping status %d", lnum, offs,
819 ubi_is_mapped(c->ubi, lnum));
819 dbg_dump_node(c, buf); 820 dbg_dump_node(c, buf);
820 dbg_dump_stack(); 821 dbg_dump_stack();
821 return -EINVAL; 822 return -EINVAL;