13
#include <linux/kernel.h>
14
#include <linux/types.h>
15
#include <linux/pagemap.h>
16
#include <linux/crc32.h>
21
#ifdef JFFS2_DBG_PARANOIA_CHECKS
25
void __jffs2_dbg_fragtree_paranoia_check(struct jffs2_inode_info *f) {
27
__jffs2_dbg_fragtree_paranoia_check_nolock(f);
31
void __jffs2_dbg_fragtree_paranoia_check_nolock(struct jffs2_inode_info *f) {
32
struct jffs2_node_frag *frag;
35
for (frag = frag_first(&f->fragtree); frag; frag = frag_next(frag)) {
36
struct jffs2_full_dnode *fn = frag->node;
38
if (!fn || !fn->raw) {
42
if (ref_flags(fn->raw) == REF_PRISTINE) {
44
JFFS2_ERROR("REF_PRISTINE node at 0x%08x had %d frags. Tell dwmw2.\n",
45
ref_offset(fn->raw), fn->frags);
55
if (frag->ofs & (PAGE_CACHE_SIZE-1) && frag_prev(frag)
56
&& frag_prev(frag)->size < PAGE_CACHE_SIZE
57
&& frag_prev(frag)->node) {
58
JFFS2_ERROR("REF_PRISTINE node at 0x%08x had a previous non-hole frag "
59
"in the same page. Tell dwmw2.\n", ref_offset(fn->raw));
63
if ((frag->ofs+frag->size) & (PAGE_CACHE_SIZE-1) && frag_next(frag)
64
&& frag_next(frag)->size < PAGE_CACHE_SIZE
65
&& frag_next(frag)->node) {
66
JFFS2_ERROR("REF_PRISTINE node at 0x%08x (%08x-%08x) had a following "
67
"non-hole frag in the same page. Tell dwmw2.\n",
68
ref_offset(fn->raw), frag->ofs, frag->ofs+frag->size);
75
JFFS2_ERROR("fragtree is corrupted.\n");
76
__jffs2_dbg_dump_fragtree_nolock(f);
84
void __jffs2_dbg_prewrite_paranoia_check(struct jffs2_sb_info *c,
85
uint32_t ofs, int len) {
95
ret = jffs2_flash_read(c, ofs, len, &retlen, buf);
96
if (ret || (retlen != len)) {
97
JFFS2_WARNING("read %d bytes failed or short. ret %d, retlen %zd.\n",
104
for (i = 0; i < len; i++) {
105
if (buf[i] != 0xff) {
110
JFFS2_ERROR("argh, about to write node to %#08x on flash, but there are data "
111
"already there. The first corrupted byte is at %#08x offset.\n", ofs, ofs + i);
112
__jffs2_dbg_dump_buffer(buf, len, ofs);
123
void __jffs2_dbg_acct_paranoia_check(struct jffs2_sb_info *c,
124
struct jffs2_eraseblock *jeb) {
125
spin_lock(&c->erase_completion_lock);
126
__jffs2_dbg_acct_paranoia_check_nolock(c, jeb);
127
spin_unlock(&c->erase_completion_lock);
130
void __jffs2_dbg_acct_paranoia_check_nolock(struct jffs2_sb_info *c,
131
struct jffs2_eraseblock *jeb) {
132
uint32_t my_used_size = 0;
133
uint32_t my_unchecked_size = 0;
134
uint32_t my_dirty_size = 0;
135
struct jffs2_raw_node_ref *ref2 = jeb->first_node;
138
uint32_t totlen = ref_totlen(c, jeb, ref2);
140
if (ref2->flash_offset < jeb->offset ||
141
ref2->flash_offset > jeb->offset + c->sector_size) {
142
JFFS2_ERROR("node_ref %#08x shouldn't be in block at %#08x.\n",
143
ref_offset(ref2), jeb->offset);
147
if (ref_flags(ref2) == REF_UNCHECKED) {
148
my_unchecked_size += totlen;
149
} else if (!ref_obsolete(ref2)) {
150
my_used_size += totlen;
152
my_dirty_size += totlen;
155
if ((!ref2->next_phys) != (ref2 == jeb->last_node)) {
156
JFFS2_ERROR("node_ref for node at %#08x (mem %p) has next_phys at %#08x (mem %p), "
157
"last_node is at %#08x (mem %p).\n",
158
ref_offset(ref2), ref2, ref_offset(ref2->next_phys), ref2->next_phys,
159
ref_offset(jeb->last_node), jeb->last_node);
162
ref2 = ref2->next_phys;
165
if (my_used_size != jeb->used_size) {
166
JFFS2_ERROR("Calculated used size %#08x != stored used size %#08x.\n",
167
my_used_size, jeb->used_size);
171
if (my_unchecked_size != jeb->unchecked_size) {
172
JFFS2_ERROR("Calculated unchecked size %#08x != stored unchecked size %#08x.\n",
173
my_unchecked_size, jeb->unchecked_size);
180
__jffs2_dbg_dump_node_refs_nolock(c, jeb);
181
__jffs2_dbg_dump_jeb_nolock(jeb);
182
__jffs2_dbg_dump_block_lists_nolock(c);
188
#if defined(JFFS2_DBG_DUMPS) || defined(JFFS2_DBG_PARANOIA_CHECKS)
192
void __jffs2_dbg_dump_node_refs(struct jffs2_sb_info *c,
193
struct jffs2_eraseblock *jeb) {
194
spin_lock(&c->erase_completion_lock);
195
__jffs2_dbg_dump_node_refs_nolock(c, jeb);
196
spin_unlock(&c->erase_completion_lock);
199
void __jffs2_dbg_dump_node_refs_nolock(struct jffs2_sb_info *c,
200
struct jffs2_eraseblock *jeb) {
201
struct jffs2_raw_node_ref *ref;
204
JFFS2_DEBUG("Dump node_refs of the eraseblock %#08x\n", jeb->offset);
205
if (!jeb->first_node) {
206
JFFS2_DEBUG("no nodes in the eraseblock %#08x\n", jeb->offset);
210
for (ref = jeb->first_node; ; ref = ref->next_phys) {
211
printk("%#08x(%#x)", ref_offset(ref), ref->__totlen);
212
if (ref->next_phys) {
227
void __jffs2_dbg_dump_jeb(struct jffs2_sb_info *c,
228
struct jffs2_eraseblock *jeb) {
229
spin_lock(&c->erase_completion_lock);
230
__jffs2_dbg_dump_jeb_nolock(jeb);
231
spin_unlock(&c->erase_completion_lock);
234
void __jffs2_dbg_dump_jeb_nolock(struct jffs2_eraseblock *jeb) {
239
JFFS2_DEBUG("dump space accounting for the eraseblock at %#08x:\n",
242
printk(JFFS2_DBG_LVL "used_size: %#08x\n", jeb->used_size);
243
printk(JFFS2_DBG_LVL "dirty_size: %#08x\n", jeb->dirty_size);
244
printk(JFFS2_DBG_LVL "wasted_size: %#08x\n", jeb->wasted_size);
245
printk(JFFS2_DBG_LVL "unchecked_size: %#08x\n", jeb->unchecked_size);
246
printk(JFFS2_DBG_LVL "free_size: %#08x\n", jeb->free_size);
249
void __jffs2_dbg_dump_block_lists(struct jffs2_sb_info *c) {
250
spin_lock(&c->erase_completion_lock);
251
__jffs2_dbg_dump_block_lists_nolock(c);
252
spin_unlock(&c->erase_completion_lock);
255
void __jffs2_dbg_dump_block_lists_nolock(struct jffs2_sb_info *c) {
256
JFFS2_DEBUG("dump JFFS2 blocks lists:\n");
258
printk(JFFS2_DBG_LVL "flash_size: %#08x\n", c->flash_size);
259
printk(JFFS2_DBG_LVL "used_size: %#08x\n", c->used_size);
260
printk(JFFS2_DBG_LVL "dirty_size: %#08x\n", c->dirty_size);
261
printk(JFFS2_DBG_LVL "wasted_size: %#08x\n", c->wasted_size);
262
printk(JFFS2_DBG_LVL "unchecked_size: %#08x\n", c->unchecked_size);
263
printk(JFFS2_DBG_LVL "free_size: %#08x\n", c->free_size);
264
printk(JFFS2_DBG_LVL "erasing_size: %#08x\n", c->erasing_size);
265
printk(JFFS2_DBG_LVL "bad_size: %#08x\n", c->bad_size);
266
printk(JFFS2_DBG_LVL "sector_size: %#08x\n", c->sector_size);
267
printk(JFFS2_DBG_LVL "jffs2_reserved_blocks size: %#08x\n",
268
c->sector_size * c->resv_blocks_write);
271
printk(JFFS2_DBG_LVL "nextblock: %#08x (used %#08x, dirty %#08x, wasted %#08x, "
272
"unchecked %#08x, free %#08x)\n",
273
c->nextblock->offset, c->nextblock->used_size,
274
c->nextblock->dirty_size, c->nextblock->wasted_size,
275
c->nextblock->unchecked_size, c->nextblock->free_size);
277
printk(JFFS2_DBG_LVL "nextblock: NULL\n");
281
printk(JFFS2_DBG_LVL "gcblock: %#08x (used %#08x, dirty %#08x, wasted %#08x, "
282
"unchecked %#08x, free %#08x)\n",
283
c->gcblock->offset, c->gcblock->used_size, c->gcblock->dirty_size,
284
c->gcblock->wasted_size, c->gcblock->unchecked_size, c->gcblock->free_size);
286
printk(JFFS2_DBG_LVL "gcblock: NULL\n");
288
if (list_empty(&c->clean_list)) {
289
printk(JFFS2_DBG_LVL "clean_list: empty\n");
291
struct list_head *this;
295
list_for_each(this, &c->clean_list) {
296
struct jffs2_eraseblock *jeb = list_entry(this, struct jffs2_eraseblock, list);
298
dirty += jeb->wasted_size;
299
if (!(jeb->used_size == 0 && jeb->dirty_size == 0 && jeb->wasted_size == 0)) {
300
printk(JFFS2_DBG_LVL "clean_list: %#08x (used %#08x, dirty %#08x, wasted %#08x, "
301
"unchecked %#08x, free %#08x)\n",
302
jeb->offset, jeb->used_size, jeb->dirty_size, jeb->wasted_size,
303
jeb->unchecked_size, jeb->free_size);
307
printk (JFFS2_DBG_LVL "Contains %d blocks with total wasted size %u, average wasted size: %u\n",
308
numblocks, dirty, dirty / numblocks);
311
if (list_empty(&c->very_dirty_list)) {
312
printk(JFFS2_DBG_LVL "very_dirty_list: empty\n");
314
struct list_head *this;
318
list_for_each(this, &c->very_dirty_list) {
319
struct jffs2_eraseblock *jeb =
320
list_entry(this, struct jffs2_eraseblock, list);
323
dirty += jeb->dirty_size;
324
if (!(jeb->used_size == 0
325
&& jeb->dirty_size == 0
326
&& jeb->wasted_size == 0)) {
327
printk(JFFS2_DBG_LVL "very_dirty_list: %#08x (used %#08x, dirty %#08x, wasted %#08x, "
328
"unchecked %#08x, free %#08x)\n",
329
jeb->offset, jeb->used_size, jeb->dirty_size, jeb->wasted_size,
330
jeb->unchecked_size, jeb->free_size);
334
printk (JFFS2_DBG_LVL "Contains %d blocks with total dirty size %u, average dirty size: %u\n",
335
numblocks, dirty, dirty / numblocks);
338
if (list_empty(&c->dirty_list)) {
339
printk(JFFS2_DBG_LVL "dirty_list: empty\n");
341
struct list_head *this;
345
list_for_each(this, &c->dirty_list) {
346
struct jffs2_eraseblock *jeb = list_entry(this,
347
struct jffs2_eraseblock, list);
350
dirty += jeb->dirty_size;
351
if (!(jeb->used_size == 0 &&
352
jeb->dirty_size == 0 && jeb->wasted_size == 0)) {
353
printk(JFFS2_DBG_LVL "dirty_list: %#08x (used %#08x, dirty %#08x, wasted %#08x, "
354
"unchecked %#08x, free %#08x)\n",
355
jeb->offset, jeb->used_size, jeb->dirty_size, jeb->wasted_size,
356
jeb->unchecked_size, jeb->free_size);
360
printk (JFFS2_DBG_LVL "contains %d blocks with total dirty size %u, average dirty size: %u\n",
361
numblocks, dirty, dirty / numblocks);
364
if (list_empty(&c->erasable_list)) {
365
printk(JFFS2_DBG_LVL "erasable_list: empty\n");
367
struct list_head *this;
369
list_for_each(this, &c->erasable_list) {
370
struct jffs2_eraseblock *jeb = list_entry(this,
371
struct jffs2_eraseblock, list);
373
if (!(jeb->used_size == 0 &&
374
jeb->dirty_size == 0 && jeb->wasted_size == 0)) {
375
printk(JFFS2_DBG_LVL "erasable_list: %#08x (used %#08x, dirty %#08x, wasted %#08x, "
376
"unchecked %#08x, free %#08x)\n",
377
jeb->offset, jeb->used_size, jeb->dirty_size, jeb->wasted_size,
378
jeb->unchecked_size, jeb->free_size);
383
if (list_empty(&c->erasing_list)) {
384
printk(JFFS2_DBG_LVL "erasing_list: empty\n");
386
struct list_head *this;
388
list_for_each(this, &c->erasing_list) {
389
struct jffs2_eraseblock *jeb = list_entry(this,
390
struct jffs2_eraseblock, list);
392
if (!(jeb->used_size == 0 &&
393
jeb->dirty_size == 0 && jeb->wasted_size == 0)) {
394
printk(JFFS2_DBG_LVL "erasing_list: %#08x (used %#08x, dirty %#08x, wasted %#08x, "
395
"unchecked %#08x, free %#08x)\n",
396
jeb->offset, jeb->used_size, jeb->dirty_size, jeb->wasted_size,
397
jeb->unchecked_size, jeb->free_size);
402
if (list_empty(&c->erase_pending_list)) {
403
printk(JFFS2_DBG_LVL "erase_pending_list: empty\n");
405
struct list_head *this;
407
list_for_each(this, &c->erase_pending_list) {
408
struct jffs2_eraseblock *jeb = list_entry(this,
409
struct jffs2_eraseblock, list);
411
if (!(jeb->used_size == 0 &&
412
jeb->dirty_size == 0 && jeb->wasted_size == 0)) {
413
printk(JFFS2_DBG_LVL "erase_pending_list: %#08x (used %#08x, dirty %#08x, wasted %#08x, "
414
"unchecked %#08x, free %#08x)\n",
415
jeb->offset, jeb->used_size, jeb->dirty_size, jeb->wasted_size,
416
jeb->unchecked_size, jeb->free_size);
421
if (list_empty(&c->erasable_pending_wbuf_list)) {
422
printk(JFFS2_DBG_LVL "erasable_pending_wbuf_list: empty\n");
424
struct list_head *this;
426
list_for_each(this, &c->erasable_pending_wbuf_list) {
427
struct jffs2_eraseblock *jeb = list_entry(this,
428
struct jffs2_eraseblock, list);
430
if (!(jeb->used_size == 0 &&
431
jeb->dirty_size == 0 && jeb->wasted_size == 0)) {
432
printk(JFFS2_DBG_LVL "erasable_pending_wbuf_list: %#08x (used %#08x, dirty %#08x, "
433
"wasted %#08x, unchecked %#08x, free %#08x)\n",
434
jeb->offset, jeb->used_size, jeb->dirty_size, jeb->wasted_size,
435
jeb->unchecked_size, jeb->free_size);
440
if (list_empty(&c->free_list)) {
441
printk(JFFS2_DBG_LVL "free_list: empty\n");
443
struct list_head *this;
445
list_for_each(this, &c->free_list) {
446
struct jffs2_eraseblock *jeb = list_entry(this,
447
struct jffs2_eraseblock, list);
449
if (!(jeb->used_size == 0 &&
450
jeb->dirty_size == 0 && jeb->wasted_size == 0)) {
451
printk(JFFS2_DBG_LVL "free_list: %#08x (used %#08x, dirty %#08x, wasted %#08x, "
452
"unchecked %#08x, free %#08x)\n",
453
jeb->offset, jeb->used_size, jeb->dirty_size, jeb->wasted_size,
454
jeb->unchecked_size, jeb->free_size);
459
if (list_empty(&c->bad_list)) {
460
printk(JFFS2_DBG_LVL "bad_list: empty\n");
462
struct list_head *this;
464
list_for_each(this, &c->bad_list) {
465
struct jffs2_eraseblock *jeb = list_entry(this,
466
struct jffs2_eraseblock, list);
468
if (!(jeb->used_size == 0 &&
469
jeb->dirty_size == 0 && jeb->wasted_size == 0)) {
470
printk(JFFS2_DBG_LVL "bad_list: %#08x (used %#08x, dirty %#08x, wasted %#08x, "
471
"unchecked %#08x, free %#08x)\n",
472
jeb->offset, jeb->used_size, jeb->dirty_size, jeb->wasted_size,
473
jeb->unchecked_size, jeb->free_size);
478
if (list_empty(&c->bad_used_list)) {
479
printk(JFFS2_DBG_LVL "bad_used_list: empty\n");
481
struct list_head *this;
483
list_for_each(this, &c->bad_used_list) {
484
struct jffs2_eraseblock *jeb = list_entry(this,
485
struct jffs2_eraseblock, list);
487
if (!(jeb->used_size == 0 &&
488
jeb->dirty_size == 0 && jeb->wasted_size == 0)) {
489
printk(JFFS2_DBG_LVL "bad_used_list: %#08x (used %#08x, dirty %#08x, wasted %#08x, "
490
"unchecked %#08x, free %#08x)\n",
491
jeb->offset, jeb->used_size, jeb->dirty_size, jeb->wasted_size,
492
jeb->unchecked_size, jeb->free_size);
498
void __jffs2_dbg_dump_fragtree(struct jffs2_inode_info *f) {
500
jffs2_dbg_dump_fragtree_nolock(f);
504
void __jffs2_dbg_dump_fragtree_nolock(struct jffs2_inode_info *f) {
505
struct jffs2_node_frag *this = frag_first(&f->fragtree);
506
uint32_t lastofs = 0;
509
JFFS2_DEBUG("dump fragtree of ino #%u\n", f->inocache->ino);
512
printk(JFFS2_DBG_LVL "frag %#04x-%#04x: %#08x(%d) on flash (*%p), left (%p), "
513
"right (%p), parent (%p)\n",
514
this->ofs, this->ofs+this->size, ref_offset(this->node->raw),
515
ref_flags(this->node->raw), this, frag_left(this), frag_right(this),
518
printk(JFFS2_DBG_LVL "frag %#04x-%#04x: hole (*%p). left (%p), right (%p), parent (%p)\n",
519
this->ofs, this->ofs+this->size, this, frag_left(this),
520
frag_right(this), frag_parent(this));
522
if (this->ofs != lastofs) {
525
lastofs = this->ofs + this->size;
526
this = frag_next(this);
530
printk(JFFS2_DBG_LVL "metadata at 0x%08x\n", ref_offset(f->metadata->raw));
533
JFFS2_ERROR("frag tree got a hole in it.\n");
538
#define JFFS2_BUFDUMP_BYTES_PER_LINE 32
539
void __jffs2_dbg_dump_buffer(unsigned char *buf, int len, uint32_t offs) {
543
JFFS2_DEBUG("dump from offset %#08x to offset %#08x (%x bytes).\n",
544
offs, offs + len, len);
545
i = skip = offs % JFFS2_BUFDUMP_BYTES_PER_LINE;
546
offs = offs & ~(JFFS2_BUFDUMP_BYTES_PER_LINE - 1);
549
printk(JFFS2_DBG_LVL "%#08x: ", offs);
557
if ((i % JFFS2_BUFDUMP_BYTES_PER_LINE) == 0 && i != len -1) {
561
offs += JFFS2_BUFDUMP_BYTES_PER_LINE;
562
printk(JFFS2_DBG_LVL "%0#8x: ", offs);
565
printk("%02x ", buf[i]);
576
void __jffs2_dbg_dump_node(struct jffs2_sb_info *c, uint32_t ofs) {
577
union jffs2_node_union node;
578
int len = sizeof(union jffs2_node_union);
583
JFFS2_DEBUG("dump node at offset %#08x.\n", ofs);
585
ret = jffs2_flash_read(c, ofs, len, &retlen, (unsigned char *)&node);
586
if (ret || (retlen != len)) {
587
JFFS2_ERROR("read %d bytes failed or short. ret %d, retlen %zd.\n",
592
printk(JFFS2_DBG_LVL "magic:\t%#04x\n",
593
je16_to_cpu(node.u.magic));
594
printk(JFFS2_DBG_LVL "nodetype:\t%#04x\n",
595
je16_to_cpu(node.u.nodetype));
596
printk(JFFS2_DBG_LVL "totlen:\t%#08x\n",
597
je32_to_cpu(node.u.totlen));
598
printk(JFFS2_DBG_LVL "hdr_crc:\t%#08x\n",
599
je32_to_cpu(node.u.hdr_crc));
601
crc = crc32(0, &node.u, sizeof(node.u) - 4);
602
if (crc != je32_to_cpu(node.u.hdr_crc)) {
603
JFFS2_ERROR("wrong common header CRC.\n");
607
if (je16_to_cpu(node.u.magic) != JFFS2_MAGIC_BITMASK &&
608
je16_to_cpu(node.u.magic) != JFFS2_OLD_MAGIC_BITMASK)
610
JFFS2_ERROR("wrong node magic: %#04x instead of %#04x.\n",
611
je16_to_cpu(node.u.magic), JFFS2_MAGIC_BITMASK);
615
switch(je16_to_cpu(node.u.nodetype)) {
617
case JFFS2_NODETYPE_INODE:
619
printk(JFFS2_DBG_LVL "the node is inode node\n");
620
printk(JFFS2_DBG_LVL "ino:\t%#08x\n",
621
je32_to_cpu(node.i.ino));
622
printk(JFFS2_DBG_LVL "version:\t%#08x\n",
623
je32_to_cpu(node.i.version));
624
printk(JFFS2_DBG_LVL "mode:\t%#08x\n",
626
printk(JFFS2_DBG_LVL "uid:\t%#04x\n",
627
je16_to_cpu(node.i.uid));
628
printk(JFFS2_DBG_LVL "gid:\t%#04x\n",
629
je16_to_cpu(node.i.gid));
630
printk(JFFS2_DBG_LVL "isize:\t%#08x\n",
631
je32_to_cpu(node.i.isize));
632
printk(JFFS2_DBG_LVL "atime:\t%#08x\n",
633
je32_to_cpu(node.i.atime));
634
printk(JFFS2_DBG_LVL "mtime:\t%#08x\n",
635
je32_to_cpu(node.i.mtime));
636
printk(JFFS2_DBG_LVL "ctime:\t%#08x\n",
637
je32_to_cpu(node.i.ctime));
638
printk(JFFS2_DBG_LVL "offset:\t%#08x\n",
639
je32_to_cpu(node.i.offset));
640
printk(JFFS2_DBG_LVL "csize:\t%#08x\n",
641
je32_to_cpu(node.i.csize));
642
printk(JFFS2_DBG_LVL "dsize:\t%#08x\n",
643
je32_to_cpu(node.i.dsize));
644
printk(JFFS2_DBG_LVL "compr:\t%#02x\n",
646
printk(JFFS2_DBG_LVL "usercompr:\t%#02x\n",
648
printk(JFFS2_DBG_LVL "flags:\t%#04x\n",
649
je16_to_cpu(node.i.flags));
650
printk(JFFS2_DBG_LVL "data_crc:\t%#08x\n",
651
je32_to_cpu(node.i.data_crc));
652
printk(JFFS2_DBG_LVL "node_crc:\t%#08x\n",
653
je32_to_cpu(node.i.node_crc));
654
crc = crc32(0, &node.i, sizeof(node.i) - 8);
655
if (crc != je32_to_cpu(node.i.node_crc)) {
656
JFFS2_ERROR("wrong node header CRC.\n");
661
case JFFS2_NODETYPE_DIRENT:
663
printk(JFFS2_DBG_LVL "the node is dirent node\n");
664
printk(JFFS2_DBG_LVL "pino:\t%#08x\n",
665
je32_to_cpu(node.d.pino));
666
printk(JFFS2_DBG_LVL "version:\t%#08x\n",
667
je32_to_cpu(node.d.version));
668
printk(JFFS2_DBG_LVL "ino:\t%#08x\n",
669
je32_to_cpu(node.d.ino));
670
printk(JFFS2_DBG_LVL "mctime:\t%#08x\n",
671
je32_to_cpu(node.d.mctime));
672
printk(JFFS2_DBG_LVL "nsize:\t%#02x\n",
674
printk(JFFS2_DBG_LVL "type:\t%#02x\n",
676
printk(JFFS2_DBG_LVL "node_crc:\t%#08x\n",
677
je32_to_cpu(node.d.node_crc));
678
printk(JFFS2_DBG_LVL "name_crc:\t%#08x\n",
679
je32_to_cpu(node.d.name_crc));
681
node.d.name[node.d.nsize] = '\0';
682
printk(JFFS2_DBG_LVL "name:\t\"%s\"\n", node.d.name);
684
crc = crc32(0, &node.d, sizeof(node.d) - 8);
685
if (crc != je32_to_cpu(node.d.node_crc)) {
686
JFFS2_ERROR("wrong node header CRC.\n");
692
printk(JFFS2_DBG_LVL "node type is unknown\n");