Lines Matching full:node
118 * Make a single attempt to progress GC. Move one node, and possibly
138 the node CRCs etc. Do it now. */ in jffs2_garbage_collect_pass()
233 D1(printk(KERN_DEBUG "Node at 0x%08x is obsolete... skipping\n", ref_offset(raw))); in jffs2_garbage_collect_pass()
247 D1(printk(KERN_DEBUG "Going to garbage collect node at 0x%08x\n", ref_offset(raw))); in jffs2_garbage_collect_pass()
250 /* Inode-less node. Clean marker, snapshot or something like that */ in jffs2_garbage_collect_pass()
268 …D1(printk(KERN_DEBUG "jffs2_garbage_collect_pass collecting from block @0x%08x. Node @0x%08x(%d), … in jffs2_garbage_collect_pass()
273 2. Inode is not in-core, node is REF_PRISTINE. We lock the in jffs2_garbage_collect_pass()
274 inocache to prevent a read_inode(), copy the node intact. in jffs2_garbage_collect_pass()
275 3. Inode is not in-core, node is not pristine. We must iget() in jffs2_garbage_collect_pass()
288 D1(printk(KERN_DEBUG "Ino #%u is absent but node not REF_PRISTINE. Reading.\n", in jffs2_garbage_collect_pass()
336 node intact, and we don't have to muck about with the fragtree etc. in jffs2_garbage_collect_pass()
426 D1(printk(KERN_DEBUG "node to be GC'd was obsoleted in the meantime.\n")); in jffs2_garbage_collect_live()
439 /* FIXME. Read node and do lookup? */ in jffs2_garbage_collect_live()
441 if (frag->node && frag->node->raw == raw) { in jffs2_garbage_collect_live()
442 fn = frag->node; in jffs2_garbage_collect_live()
446 if (nrfrags == frag->node->frags) in jffs2_garbage_collect_live()
455 frag->node->raw = f->inocache->nodes; in jffs2_garbage_collect_live()
482 printk(KERN_WARNING "Raw node at 0x%08x wasn't in node lists for ino #%u\n", in jffs2_garbage_collect_live()
501 union jffs2_node_union *node; in jffs2_garbage_collect_pristine() local
509 D1(printk(KERN_DEBUG "Going to GC REF_PRISTINE node at 0x%08x\n", ref_offset(raw))); in jffs2_garbage_collect_pristine()
526 node = kmalloc(rawlen, GFP_KERNEL); in jffs2_garbage_collect_pristine()
527 if (!node) in jffs2_garbage_collect_pristine()
530 ret = jffs2_flash_read(c, ref_offset(raw), rawlen, &retlen, (unsigned char *)node); in jffs2_garbage_collect_pristine()
536 crc = crc32(0, node, sizeof(struct jffs2_unknown_node)-4); in jffs2_garbage_collect_pristine()
537 if (je32_to_cpu(node->u.hdr_crc) != crc) { in jffs2_garbage_collect_pristine()
538 …printk(KERN_WARNING "Header CRC failed on REF_PRISTINE node at 0x%08x: Read 0x%08x, calculated 0x%… in jffs2_garbage_collect_pristine()
539 ref_offset(raw), je32_to_cpu(node->u.hdr_crc), crc); in jffs2_garbage_collect_pristine()
543 switch(je16_to_cpu(node->u.nodetype)) { in jffs2_garbage_collect_pristine()
545 crc = crc32(0, node, sizeof(node->i)-8); in jffs2_garbage_collect_pristine()
546 if (je32_to_cpu(node->i.node_crc) != crc) { in jffs2_garbage_collect_pristine()
547 …printk(KERN_WARNING "Node CRC failed on REF_PRISTINE data node at 0x%08x: Read 0x%08x, calculated … in jffs2_garbage_collect_pristine()
548 ref_offset(raw), je32_to_cpu(node->i.node_crc), crc); in jffs2_garbage_collect_pristine()
552 if (je32_to_cpu(node->i.dsize)) { in jffs2_garbage_collect_pristine()
553 crc = crc32(0, node->i.data, je32_to_cpu(node->i.csize)); in jffs2_garbage_collect_pristine()
554 if (je32_to_cpu(node->i.data_crc) != crc) { in jffs2_garbage_collect_pristine()
555 …printk(KERN_WARNING "Data CRC failed on REF_PRISTINE data node at 0x%08x: Read 0x%08x, calculated … in jffs2_garbage_collect_pristine()
556 ref_offset(raw), je32_to_cpu(node->i.data_crc), crc); in jffs2_garbage_collect_pristine()
563 crc = crc32(0, node, sizeof(node->d)-8); in jffs2_garbage_collect_pristine()
564 if (je32_to_cpu(node->d.node_crc) != crc) { in jffs2_garbage_collect_pristine()
565 …printk(KERN_WARNING "Node CRC failed on REF_PRISTINE dirent node at 0x%08x: Read 0x%08x, calculate… in jffs2_garbage_collect_pristine()
566 ref_offset(raw), je32_to_cpu(node->d.node_crc), crc); in jffs2_garbage_collect_pristine()
570 if (node->d.nsize) { in jffs2_garbage_collect_pristine()
571 crc = crc32(0, node->d.name, node->d.nsize); in jffs2_garbage_collect_pristine()
572 if (je32_to_cpu(node->d.name_crc) != crc) { in jffs2_garbage_collect_pristine()
574 ref_offset(raw), je32_to_cpu(node->d.name_crc), crc); in jffs2_garbage_collect_pristine()
580 printk(KERN_WARNING "Unknown node type for REF_PRISTINE node at 0x%08x: 0x%04x\n", in jffs2_garbage_collect_pristine()
581 ref_offset(raw), je16_to_cpu(node->u.nodetype)); in jffs2_garbage_collect_pristine()
591 /* OK, all the CRCs are good; this node can just be copied as-is. */ in jffs2_garbage_collect_pristine()
597 ret = jffs2_flash_write(c, phys_ofs, rawlen, &retlen, (unsigned char *)node); in jffs2_garbage_collect_pristine()
620 D1(printk(KERN_DEBUG "Retrying failed write of REF_PRISTINE node.\n")); in jffs2_garbage_collect_pristine()
657 D1(printk(KERN_DEBUG "WHEEE! GC REF_PRISTINE node at 0x%08x succeeded\n", ref_offset(raw))); in jffs2_garbage_collect_pristine()
660 kfree(node); in jffs2_garbage_collect_pristine()
680 /* For these, we don't actually need to read the old node */ in jffs2_garbage_collect_metadata()
819 /* Prevent the erase code from nicking the obsolete node refs while in jffs2_garbage_collect_deletion_dirent()
841 /* This is an obsolete node belonging to the same directory, and it's of the right in jffs2_garbage_collect_deletion_dirent()
845 …printk(KERN_WARNING "jffs2_g_c_deletion_dirent(): Read error (%d) reading obsolete node at %08x\n"… in jffs2_garbage_collect_deletion_dirent()
850 …"jffs2_g_c_deletion_dirent(): Short read (%zd not %u) reading header from obsolete node at %08x\n", in jffs2_garbage_collect_deletion_dirent()
870 /* OK. The name really does match. There really is still an older node on in jffs2_garbage_collect_deletion_dirent()
913 D1(printk(KERN_DEBUG "Writing replacement hole node for ino #%u from offset 0x%x to 0x%x\n", in jffs2_garbage_collect_hole()
925 …printk(KERN_WARNING "Node read failed in jffs2_garbage_collect_hole. Ret %d, retlen %zd. Data will… in jffs2_garbage_collect_hole()
929 …printk(KERN_WARNING "jffs2_garbage_collect_hole: Node at 0x%08x had node type 0x%04x instead of JF… in jffs2_garbage_collect_hole()
935 …printk(KERN_WARNING "jffs2_garbage_collect_hole: Node at 0x%08x had totlen 0x%x instead of expecte… in jffs2_garbage_collect_hole()
942 …printk(KERN_WARNING "jffs2_garbage_collect_hole: Node at 0x%08x had CRC 0x%08x which doesn't match… in jffs2_garbage_collect_hole()
951 …printk(KERN_WARNING "jffs2_garbage_collect_hole: Node 0x%08x wasn't a hole node!\n", ref_offset(fn… in jffs2_garbage_collect_hole()
998 printk(KERN_WARNING "Error writing new hole node: %ld\n", PTR_ERR(new_fn)); in jffs2_garbage_collect_hole()
1012 * We should only get here in the case where the node we are in jffs2_garbage_collect_hole()
1023 /* This is a partially-overlapped hole node. Mark it REF_NORMAL not REF_PRISTINE */ in jffs2_garbage_collect_hole()
1030 if (frag->node == fn) { in jffs2_garbage_collect_hole()
1031 frag->node = new_fn; in jffs2_garbage_collect_hole()
1037 printk(KERN_WARNING "jffs2_garbage_collect_hole: Old node still has frags!\n"); in jffs2_garbage_collect_hole()
1041 printk(KERN_WARNING "jffs2_garbage_collect_hole: New node has no frags!\n"); in jffs2_garbage_collect_hole()
1103 if (!frag->node || !frag->node->raw) { in jffs2_garbage_collect_dnode()
1113 struct jffs2_raw_node_ref *raw = frag->node->raw; in jffs2_garbage_collect_dnode()
1139 /* Find last frag which is actually part of the node we're to GC. */ in jffs2_garbage_collect_dnode()
1153 if (!frag->node || !frag->node->raw) { in jffs2_garbage_collect_dnode()
1163 struct jffs2_raw_node_ref *raw = frag->node->raw; in jffs2_garbage_collect_dnode()