Lines Matching refs:wbuf_len

320 		c->wbuf_len = 0;  in jffs2_wbuf_recover()
371 c->wbuf_len = 0; in jffs2_wbuf_recover()
444 c->wbuf_len = (end - start) - towrite; in jffs2_wbuf_recover()
446 memmove(c->wbuf, rewrite_buf + towrite, c->wbuf_len); in jffs2_wbuf_recover()
456 c->wbuf_len = end - start; in jffs2_wbuf_recover()
567 c->wbuf_ofs, c->wbuf_len); in jffs2_wbuf_recover()
596 if (!c->wbuf_len) /* already checked c->wbuf above */ in __jffs2_flush_wbuf()
610 c->wbuf_len = PAD(c->wbuf_len); in __jffs2_flush_wbuf()
614 memset(c->wbuf + c->wbuf_len, 0, c->wbuf_pagesize - c->wbuf_len); in __jffs2_flush_wbuf()
616 if ( c->wbuf_len + sizeof(struct jffs2_unknown_node) < c->wbuf_pagesize) { in __jffs2_flush_wbuf()
617 struct jffs2_unknown_node *padnode = (void *)(c->wbuf + c->wbuf_len); in __jffs2_flush_wbuf()
620 padnode->totlen = cpu_to_je32(c->wbuf_pagesize - c->wbuf_len); in __jffs2_flush_wbuf()
658 uint32_t waste = c->wbuf_pagesize - c->wbuf_len; in __jffs2_flush_wbuf()
669 c->wbuf_ofs, c->wbuf_len, waste); in __jffs2_flush_wbuf()
677 jffs2_link_node_ref(c, wbuf_jeb, (c->wbuf_ofs + c->wbuf_len) | REF_OBSOLETE, waste, NULL); in __jffs2_flush_wbuf()
694 c->wbuf_len = 0; in __jffs2_flush_wbuf()
721 old_wbuf_len = c->wbuf_len; in jffs2_flush_wbuf_gc()
784 if (len && !c->wbuf_len && (len >= c->wbuf_pagesize)) in jffs2_fill_wbuf()
787 if (len > (c->wbuf_pagesize - c->wbuf_len)) in jffs2_fill_wbuf()
788 len = c->wbuf_pagesize - c->wbuf_len; in jffs2_fill_wbuf()
789 memcpy(c->wbuf + c->wbuf_len, buf, len); in jffs2_fill_wbuf()
790 c->wbuf_len += (uint32_t) len; in jffs2_fill_wbuf()
812 c->wbuf_len = PAGE_MOD(to); in jffs2_flash_writev()
825 if (c->wbuf_len) { in jffs2_flash_writev()
834 c->wbuf_len = PAGE_MOD(to); in jffs2_flash_writev()
837 if (to != PAD(c->wbuf_ofs + c->wbuf_len)) { in jffs2_flash_writev()
841 if (c->wbuf_len) in jffs2_flash_writev()
843 c->wbuf_ofs, c->wbuf_ofs + c->wbuf_len); in jffs2_flash_writev()
848 if (c->wbuf_len != PAGE_MOD(to)) { in jffs2_flash_writev()
849 c->wbuf_len = PAGE_MOD(to); in jffs2_flash_writev()
851 if (!c->wbuf_len) { in jffs2_flash_writev()
852 c->wbuf_len = c->wbuf_pagesize; in jffs2_flash_writev()
865 if (c->wbuf_len == c->wbuf_pagesize) { in jffs2_flash_writev()
889 if (c->wbuf_len == c->wbuf_pagesize) { in jffs2_flash_writev()
911 if (c->wbuf_len && ino) in jffs2_flash_writev()
987 if (!c->wbuf_pagesize || !c->wbuf_len) in jffs2_flash_read()
996 if (owbf > c->wbuf_len) /* is read beyond write buffer ? */ in jffs2_flash_read()
998 lwbf = c->wbuf_len - owbf; /* number of bytes to copy */ in jffs2_flash_read()
1006 if (lwbf > c->wbuf_len) in jffs2_flash_read()
1007 lwbf = c->wbuf_len; in jffs2_flash_read()