Commit 4b3e58a6 authored by Artem Bityutskiy's avatar Artem Bityutskiy

UBIFS: improve scanning debug output

Include LEB number and offset in scanning debugging output.
Signed-off-by: default avatarArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
parent db0f8969
...@@ -75,7 +75,7 @@ int ubifs_scan_a_node(const struct ubifs_info *c, void *buf, int len, int lnum, ...@@ -75,7 +75,7 @@ int ubifs_scan_a_node(const struct ubifs_info *c, void *buf, int len, int lnum,
magic = le32_to_cpu(ch->magic); magic = le32_to_cpu(ch->magic);
if (magic == 0xFFFFFFFF) { if (magic == 0xFFFFFFFF) {
dbg_scan("hit empty space"); dbg_scan("hit empty space at LEB %d:%d", lnum, offs);
return SCANNED_EMPTY_SPACE; return SCANNED_EMPTY_SPACE;
} }
...@@ -85,7 +85,7 @@ int ubifs_scan_a_node(const struct ubifs_info *c, void *buf, int len, int lnum, ...@@ -85,7 +85,7 @@ int ubifs_scan_a_node(const struct ubifs_info *c, void *buf, int len, int lnum,
if (len < UBIFS_CH_SZ) if (len < UBIFS_CH_SZ)
return SCANNED_GARBAGE; return SCANNED_GARBAGE;
dbg_scan("scanning %s", dbg_ntype(ch->node_type)); dbg_scan("scanning %s at LEB %d:%d", dbg_ntype(ch->node_type), lnum, offs);
if (ubifs_check_node(c, buf, lnum, offs, quiet, 1)) if (ubifs_check_node(c, buf, lnum, offs, quiet, 1))
return SCANNED_A_CORRUPT_NODE; return SCANNED_A_CORRUPT_NODE;
...@@ -114,8 +114,8 @@ int ubifs_scan_a_node(const struct ubifs_info *c, void *buf, int len, int lnum, ...@@ -114,8 +114,8 @@ int ubifs_scan_a_node(const struct ubifs_info *c, void *buf, int len, int lnum,
return SCANNED_A_BAD_PAD_NODE; return SCANNED_A_BAD_PAD_NODE;
} }
dbg_scan("%d bytes padded, offset now %d", dbg_scan("%d bytes padded at LEB %d:%d, offset now %d", pad_len,
pad_len, ALIGN(offs + node_len + pad_len, 8)); lnum, offs, ALIGN(offs + node_len + pad_len, 8));
return node_len + pad_len; return node_len + pad_len;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment