git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'stable-3.2' into pandora-3.2
[pandora-kernel.git]
/
fs
/
ubifs
/
scan.c
diff --git
a/fs/ubifs/scan.c
b/fs/ubifs/scan.c
index
37383e8
..
58aa05d
100644
(file)
--- 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,
magic = le32_to_cpu(ch->magic);
if (magic == 0xFFFFFFFF) {
magic = le32_to_cpu(ch->magic);
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,8
@@
int ubifs_scan_a_node(const struct ubifs_info *c, void *buf, int len, int lnum,
if (len < UBIFS_CH_SZ)
return SCANNED_GARBAGE;
if (len < UBIFS_CH_SZ)
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))
return SCANNED_A_CORRUPT_NODE;
if (ubifs_check_node(c, buf, lnum, offs, quiet, 1))
return SCANNED_A_CORRUPT_NODE;
@@
-101,7
+102,7
@@
int ubifs_scan_a_node(const struct ubifs_info *c, void *buf, int len, int lnum,
if (!quiet) {
ubifs_err("bad pad node at LEB %d:%d",
lnum, offs);
if (!quiet) {
ubifs_err("bad pad node at LEB %d:%d",
lnum, offs);
-
dbg
_dump_node(c, pad);
+
ubifs
_dump_node(c, pad);
}
return SCANNED_A_BAD_PAD_NODE;
}
}
return SCANNED_A_BAD_PAD_NODE;
}
@@
-109,13
+110,13
@@
int ubifs_scan_a_node(const struct ubifs_info *c, void *buf, int len, int lnum,
/* Make the node pads to 8-byte boundary */
if ((node_len + pad_len) & 7) {
if (!quiet)
/* Make the node pads to 8-byte boundary */
if ((node_len + pad_len) & 7) {
if (!quiet)
-
dbg
_err("bad padding length %d - %d",
- offs, offs + node_len + pad_len);
+
ubifs
_err("bad padding length %d - %d",
+
offs, offs + node_len + pad_len);
return SCANNED_A_BAD_PAD_NODE;
}
return SCANNED_A_BAD_PAD_NODE;
}
- dbg_scan("%d bytes padded
, offset now %d"
,
-
pad_len
, ALIGN(offs + node_len + pad_len, 8));
+ dbg_scan("%d bytes padded
at LEB %d:%d, offset now %d", pad_len
,
+
lnum, offs
, ALIGN(offs + node_len + pad_len, 8));
return node_len + pad_len;
}
return node_len + pad_len;
}
@@
-150,8
+151,8
@@
struct ubifs_scan_leb *ubifs_start_scan(const struct ubifs_info *c, int lnum,
err = ubifs_leb_read(c, lnum, sbuf + offs, offs, c->leb_size - offs, 0);
if (err && err != -EBADMSG) {
err = ubifs_leb_read(c, lnum, sbuf + offs, offs, c->leb_size - offs, 0);
if (err && err != -EBADMSG) {
- ubifs_err("cannot read %d bytes from LEB %d:%d,
"
-
" error %d",
c->leb_size - offs, lnum, offs, err);
+ ubifs_err("cannot read %d bytes from LEB %d:%d,
error %d",
+ c->leb_size - offs, lnum, offs, err);
kfree(sleb);
return ERR_PTR(err);
}
kfree(sleb);
return ERR_PTR(err);
}
@@
-240,12
+241,10
@@
void ubifs_scanned_corruption(const struct ubifs_info *c, int lnum, int offs,
int len;
ubifs_err("corruption at LEB %d:%d", lnum, offs);
int len;
ubifs_err("corruption at LEB %d:%d", lnum, offs);
- if (dbg_is_tst_rcvry(c))
- return;
len = c->leb_size - offs;
if (len > 8192)
len = 8192;
len = c->leb_size - offs;
if (len > 8192)
len = 8192;
-
dbg
_err("first %d bytes from LEB %d:%d", len, lnum, offs);
+
ubifs
_err("first %d bytes from LEB %d:%d", len, lnum, offs);
print_hex_dump(KERN_DEBUG, "", DUMP_PREFIX_OFFSET, 32, 4, buf, len, 1);
}
print_hex_dump(KERN_DEBUG, "", DUMP_PREFIX_OFFSET, 32, 4, buf, len, 1);
}
@@
-300,16
+299,16
@@
struct ubifs_scan_leb *ubifs_scan(const struct ubifs_info *c, int lnum,
switch (ret) {
case SCANNED_GARBAGE:
switch (ret) {
case SCANNED_GARBAGE:
-
dbg
_err("garbage");
+
ubifs
_err("garbage");
goto corrupted;
case SCANNED_A_NODE:
break;
case SCANNED_A_CORRUPT_NODE:
case SCANNED_A_BAD_PAD_NODE:
goto corrupted;
case SCANNED_A_NODE:
break;
case SCANNED_A_CORRUPT_NODE:
case SCANNED_A_BAD_PAD_NODE:
-
dbg
_err("bad node");
+
ubifs
_err("bad node");
goto corrupted;
default:
goto corrupted;
default:
-
dbg
_err("unknown");
+
ubifs
_err("unknown");
err = -EINVAL;
goto error;
}
err = -EINVAL;
goto error;
}