Lines Matching refs:buf_len
448 uint32_t hdr_crc, buf_ofs, buf_len; in jffs2_scan_eraseblock() local
498 buf_len = c->wbuf_pagesize; in jffs2_scan_eraseblock()
500 buf_len = sizeof(*sm); in jffs2_scan_eraseblock()
503 err = jffs2_fill_scan_buf(c, buf + buf_size - buf_len, in jffs2_scan_eraseblock()
504 jeb->offset + c->sector_size - buf_len, in jffs2_scan_eraseblock()
505 buf_len); in jffs2_scan_eraseblock()
524 memcpy(sumptr + sumlen - buf_len, buf + buf_size - buf_len, buf_len); in jffs2_scan_eraseblock()
526 if (buf_len < sumlen) { in jffs2_scan_eraseblock()
530 sumlen - buf_len); in jffs2_scan_eraseblock()
560 buf_len = c->sector_size; in jffs2_scan_eraseblock()
562 buf_len = EMPTY_SCAN_SIZE(c->sector_size); in jffs2_scan_eraseblock()
563 err = jffs2_fill_scan_buf(c, buf, buf_ofs, buf_len); in jffs2_scan_eraseblock()
649 if (buf_ofs + buf_len < ofs + sizeof(*node)) { in jffs2_scan_eraseblock()
650 buf_len = min_t(uint32_t, buf_size, jeb->offset + c->sector_size - ofs); in jffs2_scan_eraseblock()
653 buf_len, ofs); in jffs2_scan_eraseblock()
654 err = jffs2_fill_scan_buf(c, buf, ofs, buf_len); in jffs2_scan_eraseblock()
668 scan_end = min_t(uint32_t, EMPTY_SCAN_SIZE(c->sector_size)/8, buf_len); in jffs2_scan_eraseblock()
697 if (!buf_size && (scan_end != buf_len)) {/* XIP/point case */ in jffs2_scan_eraseblock()
698 scan_end = buf_len; in jffs2_scan_eraseblock()
703 buf_len = min_t(uint32_t, buf_size, jeb->offset + c->sector_size - ofs); in jffs2_scan_eraseblock()
704 if (!buf_len) { in jffs2_scan_eraseblock()
712 scan_end = buf_len; in jffs2_scan_eraseblock()
714 buf_len, ofs); in jffs2_scan_eraseblock()
715 err = jffs2_fill_scan_buf(c, buf, ofs, buf_len); in jffs2_scan_eraseblock()
799 if (buf_ofs + buf_len < ofs + sizeof(struct jffs2_raw_inode)) { in jffs2_scan_eraseblock()
800 buf_len = min_t(uint32_t, buf_size, jeb->offset + c->sector_size - ofs); in jffs2_scan_eraseblock()
803 buf_len, ofs); in jffs2_scan_eraseblock()
804 err = jffs2_fill_scan_buf(c, buf, ofs, buf_len); in jffs2_scan_eraseblock()
816 if (buf_ofs + buf_len < ofs + je32_to_cpu(node->totlen)) { in jffs2_scan_eraseblock()
817 buf_len = min_t(uint32_t, buf_size, jeb->offset + c->sector_size - ofs); in jffs2_scan_eraseblock()
819 je32_to_cpu(node->totlen), buf_len, in jffs2_scan_eraseblock()
821 err = jffs2_fill_scan_buf(c, buf, ofs, buf_len); in jffs2_scan_eraseblock()
834 if (buf_ofs + buf_len < ofs + je32_to_cpu(node->totlen)) { in jffs2_scan_eraseblock()
835 buf_len = min_t(uint32_t, buf_size, jeb->offset + c->sector_size - ofs); in jffs2_scan_eraseblock()
837 je32_to_cpu(node->totlen), buf_len, in jffs2_scan_eraseblock()
839 err = jffs2_fill_scan_buf(c, buf, ofs, buf_len); in jffs2_scan_eraseblock()
851 if (buf_ofs + buf_len < ofs + je32_to_cpu(node->totlen)) { in jffs2_scan_eraseblock()
852 buf_len = min_t(uint32_t, buf_size, jeb->offset + c->sector_size - ofs); in jffs2_scan_eraseblock()
854 je32_to_cpu(node->totlen), buf_len, in jffs2_scan_eraseblock()
856 err = jffs2_fill_scan_buf(c, buf, ofs, buf_len); in jffs2_scan_eraseblock()