• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500-V1.0.1.40_1.0.68/src/linux/linux-2.6/fs/jffs2/

Lines Matching defs:to

57 	/* Look to see if the inode in question is pending in the wbuf */
94 D1(printk(KERN_DEBUG "No memory to allocate inodirty. Fallback to all considered dirty\n"));
121 D1(printk(KERN_DEBUG "...and adding to erase_pending_list\n"));
128 D1(printk(KERN_DEBUG "...and adding to erasable_list\n"));
139 D1(printk("About to refile bad block at %08x\n", jeb->offset));
147 D1(printk("Refiling block at %08x to bad_used_list\n", jeb->offset));
151 /* It has to have had some nodes or we couldn't be here */
152 D1(printk("Refiling block at %08x to erase_pending_list\n", jeb->offset));
164 /* convert to wasted */
198 /* Find a frag which refers to the full_dnode we want to modify */
223 /* Recover from failure to write wbuf. Recover the nodes up to the
224 * wbuf, not the one which we were starting to try to write. */
247 /* Find the first node to be recovered, by skipping over every
260 dbg_noderef("First node to be recovered is at 0x%08x(%d)-0x%08x\n",
269 /* All nodes were obsolete. Nothing to recover. */
270 D1(printk(KERN_DEBUG "No non-obsolete nodes to be recovered. Just filing block bad\n"));
279 /* Count the number of refs which need to be copied */
289 * Attempt to reread the old data into our buffer. */
319 /* If this was the only node to be recovered, give up */
325 /* It wasn't. Go on and try to recover nodes complete in the wbuf */
335 /* OK... we're to rewrite (end-start) bytes of data from first_raw onwards.
341 printk(KERN_WARNING "Failed to allocate space for wbuf recovery. Data loss ensues.\n");
351 printk(KERN_WARNING "Failed to allocate node refs for wbuf recovery. Data loss ensues.\n");
359 /* Need to do another write immediately, but it's possible
385 printk(KERN_CRIT "Recovery of wbuf failed due to a second write error\n");
393 printk(KERN_NOTICE "Recovery of wbuf succeeded to %08x\n", ofs);
410 /* Now sort out the jffs2_raw_node_refs, moving them from the old to the next block */
421 D1(printk(KERN_DEBUG "Refiling block of %08x at %08x(%d) to %08x\n",
453 /* If it's an in-core inode, then we have to adjust any
454 full_dirent or full_dnode structure to point to the
459 JFFS2_ERROR("Failed to iget() ino #%u, err %ld\n",
465 going to modify it on us anyway because we hold the
502 D1(printk(KERN_DEBUG "Failing block at %08x is now empty. Moving to erase_pending_list\n", jeb->offset));
535 /* Nothing to do if not write-buffering the flash. In particular, we shouldn't
554 this happens, if we have a change to a new block,
555 or if fsync forces us to flush the writebuffer.
556 if we have a switch to next page, we will not have
611 /* wbuf_pagesize - wbuf_len is the amount of space that's to be
647 /* Trigger garbage collection to flush the write-buffer.
711 /* Pad write-buffer to end and write it, wasting space. */
743 unsigned long count, loff_t to, size_t *retlen,
748 uint32_t outvec_to = to;
753 return jffs2_flash_direct_writev(c, invecs, count, to, retlen);
757 /* If wbuf_ofs is not initialized, set it to target address */
759 c->wbuf_ofs = PAGE_DIV(to);
760 c->wbuf_len = PAGE_MOD(to);
765 * Sanity checks on target address. It's permitted to write
766 * at PAD(c->wbuf_len+c->wbuf_ofs), and it's permitted to
771 if (SECTOR_ADDR(to) != SECTOR_ADDR(c->wbuf_ofs)) {
772 /* It's a write to a new block */
774 D1(printk(KERN_DEBUG "jffs2_flash_writev() to 0x%lx "
776 (unsigned long)to, c->wbuf_ofs));
781 /* set pointer to new block */
782 c->wbuf_ofs = PAGE_DIV(to);
783 c->wbuf_len = PAGE_MOD(to);
786 if (to != PAD(c->wbuf_ofs + c->wbuf_len)) {
789 "to %08lx\n", (unsigned long)to);
797 if (c->wbuf_len != PAGE_MOD(to)) {
798 c->wbuf_len = PAGE_MOD(to);
799 /* take care of alignment to next page */
855 int res = jffs2_sum_add_kvec(c, invecs, count, (uint32_t) to);
870 * refile nextblock to avoid writing again to same address.
947 lwbf = c->wbuf_len - owbf; /* number of bytes to copy */
954 lwbf = len - orbf; /* number of bytes to copy */
1078 * On NAND we try to mark this block bad. If the block was erased more
1089 /* if the count is < max, we try to write the counter to the 2nd page oob area */
1160 * - Sectors have to be at least 4 K + some bytes
1162 * - we take at least 8 eraseblocks and want to have at least 8K size
1172 /* It may be necessary to adjust the flash size */
1177 printk(KERN_WARNING "JFFS2 flash size adjusted to %dKiB\n", c->flash_size);