Lines Matching refs:wbuf

60 	/* Look to see if the inode in question is pending in the wbuf */
260 c->wbuf, c->wbuf_pagesize, 0);
272 /* Recover from failure to write wbuf. Recover the nodes up to the
273 * wbuf, not the one which we were starting to try to write. */
297 node which ends before the wbuf starts, or which is obsolete. */
332 dbg_noderef("wbuf recover %08x-%08x (%d bytes in %d nodes)\n",
342 pr_crit("Malloc failure in wbuf recovery. Data loss ensues.\n");
357 pr_crit("Old data are already lost in wbuf recovery. Data loss ensues.\n");
375 /* It wasn't. Go on and try to recover nodes complete in the wbuf */
377 dbg_noderef("wbuf now recover %08x-%08x (%d bytes in %d nodes)\n",
381 /* Read succeeded. Copy the remaining data from the wbuf */
382 memcpy(buf + (c->wbuf_ofs - start), c->wbuf, end - c->wbuf_ofs);
386 Either 'buf' contains the data, or we find it in the wbuf */
391 pr_warn("Failed to allocate space for wbuf recovery. Data loss ensues.\n");
401 pr_warn("Failed to allocate node refs for wbuf recovery. Data loss ensues.\n");
410 that this is just because the wbuf itself is completely
414 unsigned char *rewrite_buf = buf?:c->wbuf;
417 jffs2_dbg(1, "Write 0x%x bytes at 0x%08x in wbuf recover\n",
434 pr_crit("Recovery of wbuf failed due to a second write error\n");
442 pr_notice("Recovery of wbuf succeeded to %08x\n", ofs);
446 memmove(c->wbuf, rewrite_buf + towrite, c->wbuf_len);
451 memcpy(c->wbuf, buf, end-start);
453 memmove(c->wbuf, c->wbuf + (start - c->wbuf_ofs), end - start);
518 (void *)(buf?:c->wbuf) + (ref_offset(raw) - start));
566 jffs2_dbg(1, "wbuf recovery completed OK. wbuf_ofs 0x%08x, len 0x%x\n",
596 if (!c->wbuf_len) /* already checked c->wbuf above */
614 memset(c->wbuf + c->wbuf_len, 0, c->wbuf_pagesize - c->wbuf_len);
617 struct jffs2_unknown_node *padnode = (void *)(c->wbuf + c->wbuf_len);
639 &retlen, c->wbuf);
649 } else if ((ret = jffs2_verify_write(c, c->wbuf, c->wbuf_ofs))) {
668 pr_crit("jffs2_flush_wbuf(): Accounting error. wbuf at 0x%08x has 0x%03x bytes, 0x%03x left.\n",
691 memset(c->wbuf,0xff,c->wbuf_pagesize);
710 if (!c->wbuf)
715 jffs2_dbg(1, "Ino #%d not pending in wbuf. Returning\n", ino);
729 /* retry flushing wbuf in case jffs2_wbuf_recover
730 left some data in the wbuf */
747 /* retry flushing wbuf in case jffs2_wbuf_recover
748 left some data in the wbuf */
768 if (!c->wbuf)
773 /* retry - maybe wbuf recover left some data in wbuf. */
789 memcpy(c->wbuf + c->wbuf_len, buf, len);
813 memset(c->wbuf,0xff,c->wbuf_pagesize);
826 jffs2_dbg(1, "%s(): to 0x%lx causes flush of wbuf at 0x%08x\n",
842 pr_crit("wbuf was previously %08x-%08x\n",
900 * If there's a remainder in the wbuf and it's a non-GC write,
901 * remember that the wbuf affects this ino
920 * At this point we have no problem, c->wbuf is empty. However
1010 memcpy(buf+orbf,c->wbuf+owbf,lwbf);
1207 c->wbuf = kmalloc(c->wbuf_pagesize, GFP_KERNEL);
1208 if (!c->wbuf)
1213 kfree(c->wbuf);
1221 kfree(c->wbuf);
1233 kfree(c->wbuf);
1268 c->wbuf = kmalloc(c->wbuf_pagesize, GFP_KERNEL);
1269 if (!c->wbuf)
1275 kfree(c->wbuf);
1290 kfree(c->wbuf);
1305 c->wbuf = kmalloc(c->wbuf_pagesize, GFP_KERNEL);
1306 if (!c->wbuf)
1312 kfree(c->wbuf);
1323 kfree(c->wbuf);
1338 c->wbuf = kmalloc(c->wbuf_pagesize, GFP_KERNEL);
1339 if (!c->wbuf)
1349 kfree(c->wbuf);