Lines Matching full:node
170 /* Only a CLEANMARKER node is valid */ in jffs2_scan_medium()
310 struct jffs2_unknown_node *node; in jffs2_scan_eraseblock() local
409 if (jeb->offset + c->sector_size < ofs + sizeof(*node)) { in jffs2_scan_eraseblock()
411 jeb->offset, c->sector_size, ofs, sizeof(*node))); in jffs2_scan_eraseblock()
416 if (buf_ofs + buf_len < ofs + sizeof(*node)) { in jffs2_scan_eraseblock()
418 …D1(printk(KERN_DEBUG "Fewer than %zd bytes (node header) left to end of buf. Reading 0x%x at 0x%08… in jffs2_scan_eraseblock()
426 node = (struct jffs2_unknown_node *)&buf[ofs-buf_ofs]; in jffs2_scan_eraseblock()
477 if (ofs == jeb->offset && je16_to_cpu(node->magic) == KSAMTIB_CIGAM_2SFFJ) { in jffs2_scan_eraseblock()
483 if (je16_to_cpu(node->magic) == JFFS2_DIRTY_BITMASK) { in jffs2_scan_eraseblock()
489 if (je16_to_cpu(node->magic) == JFFS2_OLD_MAGIC_BITMASK) { in jffs2_scan_eraseblock()
496 if (je16_to_cpu(node->magic) != JFFS2_MAGIC_BITMASK) { in jffs2_scan_eraseblock()
500 je16_to_cpu(node->magic)); in jffs2_scan_eraseblock()
505 /* We seem to have a node of sorts. Check the CRC */ in jffs2_scan_eraseblock()
506 crcnode.magic = node->magic; in jffs2_scan_eraseblock()
507 crcnode.nodetype = cpu_to_je16( je16_to_cpu(node->nodetype) | JFFS2_NODE_ACCURATE); in jffs2_scan_eraseblock()
508 crcnode.totlen = node->totlen; in jffs2_scan_eraseblock()
511 if (hdr_crc != je32_to_cpu(node->hdr_crc)) { in jffs2_scan_eraseblock()
512 …noisy_printk(&noise, "jffs2_scan_eraseblock(): Node at 0x%08x {0x%04x, 0x%04x, 0x%08x) has invalid… in jffs2_scan_eraseblock()
513 ofs, je16_to_cpu(node->magic), in jffs2_scan_eraseblock()
514 je16_to_cpu(node->nodetype), in jffs2_scan_eraseblock()
515 je32_to_cpu(node->totlen), in jffs2_scan_eraseblock()
516 je32_to_cpu(node->hdr_crc), in jffs2_scan_eraseblock()
523 if (ofs + je32_to_cpu(node->totlen) > in jffs2_scan_eraseblock()
525 /* Eep. Node goes over the end of the erase block. */ in jffs2_scan_eraseblock()
526 …printk(KERN_WARNING "Node at 0x%08x with length 0x%08x would run over the end of the erase block\n… in jffs2_scan_eraseblock()
527 ofs, je32_to_cpu(node->totlen)); in jffs2_scan_eraseblock()
534 if (!(je16_to_cpu(node->nodetype) & JFFS2_NODE_ACCURATE)) { in jffs2_scan_eraseblock()
535 /* Wheee. This is an obsoleted node */ in jffs2_scan_eraseblock()
536 D2(printk(KERN_DEBUG "Node at 0x%08x is obsolete. Skipping\n", ofs)); in jffs2_scan_eraseblock()
537 DIRTY_SPACE(PAD(je32_to_cpu(node->totlen))); in jffs2_scan_eraseblock()
538 ofs += PAD(je32_to_cpu(node->totlen)); in jffs2_scan_eraseblock()
542 switch(je16_to_cpu(node->nodetype)) { in jffs2_scan_eraseblock()
546 …D1(printk(KERN_DEBUG "Fewer than %zd bytes (inode node) left to end of buf. Reading 0x%x at 0x%08x… in jffs2_scan_eraseblock()
552 node = (void *)buf; in jffs2_scan_eraseblock()
554 err = jffs2_scan_inode_node(c, jeb, (void *)node, ofs); in jffs2_scan_eraseblock()
556 ofs += PAD(je32_to_cpu(node->totlen)); in jffs2_scan_eraseblock()
560 if (buf_ofs + buf_len < ofs + je32_to_cpu(node->totlen)) { in jffs2_scan_eraseblock()
562 …D1(printk(KERN_DEBUG "Fewer than %d bytes (dirent node) left to end of buf. Reading 0x%x at 0x%08x… in jffs2_scan_eraseblock()
563 je32_to_cpu(node->totlen), buf_len, ofs)); in jffs2_scan_eraseblock()
568 node = (void *)buf; in jffs2_scan_eraseblock()
570 err = jffs2_scan_dirent_node(c, jeb, (void *)node, ofs); in jffs2_scan_eraseblock()
572 ofs += PAD(je32_to_cpu(node->totlen)); in jffs2_scan_eraseblock()
576 D1(printk(KERN_DEBUG "CLEANMARKER node found at 0x%08x\n", ofs)); in jffs2_scan_eraseblock()
577 if (je32_to_cpu(node->totlen) != c->cleanmarker_size) { in jffs2_scan_eraseblock()
578 printk(KERN_NOTICE "CLEANMARKER node found at 0x%08x has totlen 0x%x != normal 0x%x\n", in jffs2_scan_eraseblock()
579 ofs, je32_to_cpu(node->totlen), c->cleanmarker_size); in jffs2_scan_eraseblock()
583 …printk(KERN_NOTICE "CLEANMARKER node found at 0x%08x, not first node in block (0x%08x)\n", ofs, je… in jffs2_scan_eraseblock()
589 printk(KERN_NOTICE "Failed to allocate node ref for clean marker\n"); in jffs2_scan_eraseblock()
604 DIRTY_SPACE(PAD(je32_to_cpu(node->totlen))); in jffs2_scan_eraseblock()
605 ofs += PAD(je32_to_cpu(node->totlen)); in jffs2_scan_eraseblock()
609 switch (je16_to_cpu(node->nodetype) & JFFS2_COMPAT_MASK) { in jffs2_scan_eraseblock()
611 …rintk(KERN_NOTICE "Read-only compatible feature node (0x%04x) found at offset 0x%08x\n", je16_to_c… in jffs2_scan_eraseblock()
615 DIRTY_SPACE(PAD(je32_to_cpu(node->totlen))); in jffs2_scan_eraseblock()
616 ofs += PAD(je32_to_cpu(node->totlen)); in jffs2_scan_eraseblock()
620 …printk(KERN_NOTICE "Incompatible feature node (0x%04x) found at offset 0x%08x\n", je16_to_cpu(node… in jffs2_scan_eraseblock()
624 …ntk(KERN_NOTICE "Unknown but compatible feature node (0x%04x) found at offset 0x%08x\n", je16_to_c… in jffs2_scan_eraseblock()
625 DIRTY_SPACE(PAD(je32_to_cpu(node->totlen))); in jffs2_scan_eraseblock()
626 ofs += PAD(je32_to_cpu(node->totlen)); in jffs2_scan_eraseblock()
630 …ntk(KERN_NOTICE "Unknown but compatible feature node (0x%04x) found at offset 0x%08x\n", je16_to_c… in jffs2_scan_eraseblock()
631 USED_SPACE(PAD(je32_to_cpu(node->totlen))); in jffs2_scan_eraseblock()
632 ofs += PAD(je32_to_cpu(node->totlen)); in jffs2_scan_eraseblock()
700 D1(printk(KERN_DEBUG "jffs2_scan_inode_node(): Node at 0x%08x\n", ofs)); in jffs2_scan_inode_node()
703 this node; we can do all the CRC checking etc. later. There's a tradeoff here -- in jffs2_scan_inode_node()
713 printk(KERN_NOTICE "jffs2_scan_inode_node(): allocation of node reference failed\n"); in jffs2_scan_inode_node()
720 first node we found for this inode. Do a CRC check to protect against the former in jffs2_scan_inode_node()
725 …printk(KERN_NOTICE "jffs2_scan_inode_node(): CRC failed on node at 0x%08x: Read 0x%08x, calculated… in jffs2_scan_inode_node()
727 /* We believe totlen because the CRC on the node _header_ was OK, just the node itself failed. */ in jffs2_scan_inode_node()
753 D1(printk(KERN_DEBUG "Node is ino #%u, version %d. Range 0x%x-0x%x\n", in jffs2_scan_inode_node()
772 D1(printk(KERN_DEBUG "jffs2_scan_dirent_node(): Node at 0x%08x\n", ofs)); in jffs2_scan_dirent_node()
774 /* We don't get here unless the node is still valid, so we don't have to in jffs2_scan_dirent_node()
779 …printk(KERN_NOTICE "jffs2_scan_dirent_node(): Node CRC failed on node at 0x%08x: Read 0x%08x, calc… in jffs2_scan_dirent_node()
781 /* We believe totlen because the CRC on the node _header_ was OK, just the node itself failed. */ in jffs2_scan_dirent_node()
797 …printk(KERN_NOTICE "jffs2_scan_dirent_node(): Name CRC failed on node at 0x%08x: Read 0x%08x, calc… in jffs2_scan_dirent_node()
802 /* We believe totlen because the CRC on the node _header_ was OK, just the name failed. */ in jffs2_scan_dirent_node()
809 printk(KERN_NOTICE "jffs2_scan_dirent_node(): allocation of node reference failed\n"); in jffs2_scan_dirent_node()