Lines Matching refs:node
175 /* Only a CLEANMARKER node is valid */
340 JFFS2_WARNING("node CRC failed at %#08x, read=%#08x, calc=%#08x\n",
353 JFFS2_WARNING("node length mismatch at %#08x, read=%u, calc=%u\n",
367 raw->next_in_ino = xd->node->next_in_ino;
368 xd->node->next_in_ino = raw;
396 JFFS2_WARNING("node CRC failed at %#08x, read=%#08x, calc=%#08x\n",
404 JFFS2_WARNING("node length mismatch at %#08x, read=%u, calc=%zd\n",
447 struct jffs2_unknown_node *node;
529 /* Need to read more so that the entire summary node is present */
619 /* Make sure there are node refs available for use */
641 if (jeb->offset + c->sector_size < ofs + sizeof(*node)) {
645 sizeof(*node));
651 if (buf_ofs + buf_len < ofs + sizeof(*node)) {
653 jffs2_dbg(1, "Fewer than %zd bytes (node header) left to end of buf. Reading 0x%x at 0x%08x\n",
662 node = (struct jffs2_unknown_node *)&buf[ofs-buf_ofs];
724 if (ofs == jeb->offset && je16_to_cpu(node->magic) == KSAMTIB_CIGAM_2SFFJ) {
732 if (je16_to_cpu(node->magic) == JFFS2_DIRTY_BITMASK) {
739 if (je16_to_cpu(node->magic) == JFFS2_OLD_MAGIC_BITMASK) {
747 if (je16_to_cpu(node->magic) != JFFS2_MAGIC_BITMASK) {
752 je16_to_cpu(node->magic));
758 /* We seem to have a node of sorts. Check the CRC */
759 crcnode.magic = node->magic;
760 crcnode.nodetype = cpu_to_je16( je16_to_cpu(node->nodetype) | JFFS2_NODE_ACCURATE);
761 crcnode.totlen = node->totlen;
764 if (hdr_crc != je32_to_cpu(node->hdr_crc)) {
767 ofs, je16_to_cpu(node->magic),
768 je16_to_cpu(node->nodetype),
769 je32_to_cpu(node->totlen),
770 je32_to_cpu(node->hdr_crc),
778 if (ofs + je32_to_cpu(node->totlen) > jeb->offset + c->sector_size) {
781 ofs, je32_to_cpu(node->totlen));
789 if (!(je16_to_cpu(node->nodetype) & JFFS2_NODE_ACCURATE)) {
790 /* Wheee. This is an obsoleted node */
793 if ((err = jffs2_scan_dirty_space(c, jeb, PAD(je32_to_cpu(node->totlen)))))
795 ofs += PAD(je32_to_cpu(node->totlen));
799 switch(je16_to_cpu(node->nodetype)) {
803 jffs2_dbg(1, "Fewer than %zd bytes (inode node) left to end of buf. Reading 0x%x at 0x%08x\n",
810 node = (void *)buf;
812 err = jffs2_scan_inode_node(c, jeb, (void *)node, ofs, s);
814 ofs += PAD(je32_to_cpu(node->totlen));
818 if (buf_ofs + buf_len < ofs + je32_to_cpu(node->totlen)) {
820 jffs2_dbg(1, "Fewer than %d bytes (dirent node) left to end of buf. Reading 0x%x at 0x%08x\n",
821 je32_to_cpu(node->totlen), buf_len,
827 node = (void *)buf;
829 err = jffs2_scan_dirent_node(c, jeb, (void *)node, ofs, s);
831 ofs += PAD(je32_to_cpu(node->totlen));
836 if (buf_ofs + buf_len < ofs + je32_to_cpu(node->totlen)) {
838 jffs2_dbg(1, "Fewer than %d bytes (xattr node) left to end of buf. Reading 0x%x at 0x%08x\n",
839 je32_to_cpu(node->totlen), buf_len,
845 node = (void *)buf;
847 err = jffs2_scan_xattr_node(c, jeb, (void *)node, ofs, s);
850 ofs += PAD(je32_to_cpu(node->totlen));
853 if (buf_ofs + buf_len < ofs + je32_to_cpu(node->totlen)) {
855 jffs2_dbg(1, "Fewer than %d bytes (xref node) left to end of buf. Reading 0x%x at 0x%08x\n",
856 je32_to_cpu(node->totlen), buf_len,
862 node = (void *)buf;
864 err = jffs2_scan_xref_node(c, jeb, (void *)node, ofs, s);
867 ofs += PAD(je32_to_cpu(node->totlen));
872 jffs2_dbg(1, "CLEANMARKER node found at 0x%08x\n", ofs);
873 if (je32_to_cpu(node->totlen) != c->cleanmarker_size) {
874 pr_notice("CLEANMARKER node found at 0x%08x has totlen 0x%x != normal 0x%x\n",
875 ofs, je32_to_cpu(node->totlen),
881 pr_notice("CLEANMARKER node found at 0x%08x, not first node in block (0x%08x)\n",
895 jffs2_sum_add_padding_mem(s, je32_to_cpu(node->totlen));
896 if ((err = jffs2_scan_dirty_space(c, jeb, PAD(je32_to_cpu(node->totlen)))))
898 ofs += PAD(je32_to_cpu(node->totlen));
902 switch (je16_to_cpu(node->nodetype) & JFFS2_COMPAT_MASK) {
904 pr_notice("Read-only compatible feature node (0x%04x) found at offset 0x%08x\n",
905 je16_to_cpu(node->nodetype), ofs);
909 if ((err = jffs2_scan_dirty_space(c, jeb, PAD(je32_to_cpu(node->totlen)))))
911 ofs += PAD(je32_to_cpu(node->totlen));
915 pr_notice("Incompatible feature node (0x%04x) found at offset 0x%08x\n",
916 je16_to_cpu(node->nodetype), ofs);
920 jffs2_dbg(1, "Unknown but compatible feature node (0x%04x) found at offset 0x%08x\n",
921 je16_to_cpu(node->nodetype), ofs);
922 if ((err = jffs2_scan_dirty_space(c, jeb, PAD(je32_to_cpu(node->totlen)))))
924 ofs += PAD(je32_to_cpu(node->totlen));
928 jffs2_dbg(1, "Unknown but compatible feature node (0x%04x) found at offset 0x%08x\n",
929 je16_to_cpu(node->nodetype), ofs);
931 jffs2_link_node_ref(c, jeb, ofs | REF_PRISTINE, PAD(je32_to_cpu(node->totlen)), NULL);
935 ofs += PAD(je32_to_cpu(node->totlen));
1000 this node; we can do all the CRC checking etc. later. There's a tradeoff here --
1008 /* Check the node CRC in any case. */
1011 pr_notice("%s(): CRC failed on node at 0x%08x: Read 0x%08x, calculated 0x%08x\n",
1014 * We believe totlen because the CRC on the node
1015 * _header_ was OK, just the node itself failed.
1056 /* We don't get here unless the node is still valid, so we don't have to
1061 pr_notice("%s(): Node CRC failed on node at 0x%08x: Read 0x%08x, calculated 0x%08x\n",
1063 /* We believe totlen because the CRC on the node _header_ was OK, just the node itself failed. */
1086 pr_notice("%s(): Name CRC failed on node at 0x%08x: Read 0x%08x, calculated 0x%08x\n",
1092 /* We believe totlen because the CRC on the node _header_ was OK, just the name failed. */