diff options
Diffstat (limited to 'fs/ubifs/scan.c')
-rw-r--r-- | fs/ubifs/scan.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/fs/ubifs/scan.c b/fs/ubifs/scan.c index 7c40e6025fd6..58aa05df2bb6 100644 --- a/fs/ubifs/scan.c +++ b/fs/ubifs/scan.c | |||
@@ -75,7 +75,7 @@ int ubifs_scan_a_node(const struct ubifs_info *c, void *buf, int len, int lnum, | |||
75 | magic = le32_to_cpu(ch->magic); | 75 | magic = le32_to_cpu(ch->magic); |
76 | 76 | ||
77 | if (magic == 0xFFFFFFFF) { | 77 | if (magic == 0xFFFFFFFF) { |
78 | dbg_scan("hit empty space"); | 78 | dbg_scan("hit empty space at LEB %d:%d", lnum, offs); |
79 | return SCANNED_EMPTY_SPACE; | 79 | return SCANNED_EMPTY_SPACE; |
80 | } | 80 | } |
81 | 81 | ||
@@ -85,7 +85,8 @@ int ubifs_scan_a_node(const struct ubifs_info *c, void *buf, int len, int lnum, | |||
85 | if (len < UBIFS_CH_SZ) | 85 | if (len < UBIFS_CH_SZ) |
86 | return SCANNED_GARBAGE; | 86 | return SCANNED_GARBAGE; |
87 | 87 | ||
88 | dbg_scan("scanning %s", dbg_ntype(ch->node_type)); | 88 | dbg_scan("scanning %s at LEB %d:%d", |
89 | dbg_ntype(ch->node_type), lnum, offs); | ||
89 | 90 | ||
90 | if (ubifs_check_node(c, buf, lnum, offs, quiet, 1)) | 91 | if (ubifs_check_node(c, buf, lnum, offs, quiet, 1)) |
91 | return SCANNED_A_CORRUPT_NODE; | 92 | return SCANNED_A_CORRUPT_NODE; |
@@ -114,8 +115,8 @@ int ubifs_scan_a_node(const struct ubifs_info *c, void *buf, int len, int lnum, | |||
114 | return SCANNED_A_BAD_PAD_NODE; | 115 | return SCANNED_A_BAD_PAD_NODE; |
115 | } | 116 | } |
116 | 117 | ||
117 | dbg_scan("%d bytes padded, offset now %d", | 118 | dbg_scan("%d bytes padded at LEB %d:%d, offset now %d", pad_len, |
118 | pad_len, ALIGN(offs + node_len + pad_len, 8)); | 119 | lnum, offs, ALIGN(offs + node_len + pad_len, 8)); |
119 | 120 | ||
120 | return node_len + pad_len; | 121 | return node_len + pad_len; |
121 | } | 122 | } |
@@ -150,8 +151,8 @@ struct ubifs_scan_leb *ubifs_start_scan(const struct ubifs_info *c, int lnum, | |||
150 | 151 | ||
151 | err = ubifs_leb_read(c, lnum, sbuf + offs, offs, c->leb_size - offs, 0); | 152 | err = ubifs_leb_read(c, lnum, sbuf + offs, offs, c->leb_size - offs, 0); |
152 | if (err && err != -EBADMSG) { | 153 | if (err && err != -EBADMSG) { |
153 | ubifs_err("cannot read %d bytes from LEB %d:%d," | 154 | ubifs_err("cannot read %d bytes from LEB %d:%d, error %d", |
154 | " error %d", c->leb_size - offs, lnum, offs, err); | 155 | c->leb_size - offs, lnum, offs, err); |
155 | kfree(sleb); | 156 | kfree(sleb); |
156 | return ERR_PTR(err); | 157 | return ERR_PTR(err); |
157 | } | 158 | } |
@@ -240,8 +241,6 @@ void ubifs_scanned_corruption(const struct ubifs_info *c, int lnum, int offs, | |||
240 | int len; | 241 | int len; |
241 | 242 | ||
242 | ubifs_err("corruption at LEB %d:%d", lnum, offs); | 243 | ubifs_err("corruption at LEB %d:%d", lnum, offs); |
243 | if (dbg_is_tst_rcvry(c)) | ||
244 | return; | ||
245 | len = c->leb_size - offs; | 244 | len = c->leb_size - offs; |
246 | if (len > 8192) | 245 | if (len > 8192) |
247 | len = 8192; | 246 | len = 8192; |