Lines Matching defs:len

584  * @len: how many bytes to read
597 void *buf, int offset, int len, int check)
622 len, offset, vol_id, lnum);
625 memset(buf, 0xFF, len);
630 len, offset, vol_id, lnum, pnum);
688 ubi_assert(len == be32_to_cpu(vid_hdr->data_size));
694 err = ubi_io_read_data(ubi, buf, pnum, offset, len);
712 uint32_t crc1 = crc32(UBI_CRC32_INIT, buf, len);
741 * @len: how many bytes to read
749 struct ubi_sgl *sgl, int lnum, int offset, int len,
759 if (len < sg->length - sgl->page_pos)
760 to_read = len;
771 len -= to_read;
772 if (!len) {
796 * @len: how many bytes should have been written
808 const void *buf, int offset, int len,
838 memset(ubi->peb_buf + offset, 0xFF, len);
849 memcpy(ubi->peb_buf + offset, buf, len);
851 data_size = offset + len;
895 * @len: how many bytes should have been written
904 const void *buf, int offset, int len)
917 err = try_recover_peb(vol, pnum, lnum, buf, offset, len, vidb,
937 * @len: how many bytes should be written
947 int offset, int len)
961 len, offset, vol_id, lnum, pnum);
970 if (len) {
971 err = ubi_io_write_data(ubi, buf, pnum, offset, len);
975 len, offset, vol_id, lnum, pnum);
1009 * @len: how many bytes to write
1018 const void *buf, int offset, int len)
1040 len, offset, vol_id, lnum, pnum);
1042 err = ubi_io_write_data(ubi, buf, pnum, offset, len);
1047 offset, len);
1073 err = try_write_vid_and_data(vol, lnum, vidb, buf, offset, len);
1104 * @len: how many bytes to write
1111 * When writing to the last logical eraseblock, the @len argument doesn't have
1114 * alignment. In all other cases, @len has to be aligned.
1121 int lnum, const void *buf, int len, int used_ebs)
1123 int err, tries, data_size = len, vol_id = vol->vol_id;
1132 /* If this is the last LEB @len may be unaligned */
1133 len = ALIGN(data_size, ubi->min_io_size);
1135 ubi_assert(!(len & (ubi->min_io_size - 1)));
1162 err = try_write_vid_and_data(vol, lnum, vidb, buf, 0, len);
1187 * @len: how many bytes to write
1190 * has to contain new logical eraseblock data, and @len - the length of the
1199 int lnum, const void *buf, int len)
1209 if (len == 0) {
1237 crc = crc32(UBI_CRC32_INIT, buf, len);
1239 vid_hdr->data_size = cpu_to_be32(len);
1246 err = try_write_vid_and_data(vol, lnum, vidb, buf, 0, len);