Lines Matching refs:write_offset
395 size_t write_offset; in bio_write() local
400 write_offset = b->offset + b->len; in bio_write()
401 if (write_offset >= b->size) in bio_write()
402 write_offset -= b->size; in bio_write()
405 if (write_offset + rest <= b->size) in bio_write()
409 chunk = b->size - write_offset; in bio_write()
411 memcpy(b->buf + write_offset, buf, chunk); in bio_write()
435 size_t write_offset; in bio_nwrite0() local
463 write_offset = b->offset + b->len; in bio_nwrite0()
464 if (write_offset >= b->size) in bio_nwrite0()
465 write_offset -= b->size; in bio_nwrite0()
466 if (write_offset + num > b->size) in bio_nwrite0()
470 num = b->size - write_offset; in bio_nwrite0()
473 *buf = b->buf + write_offset; in bio_nwrite0()
474 assert(write_offset + num <= b->size); in bio_nwrite0()