Lines Matching refs:write_offset
310 size_t write_offset; in bio_write() local
315 write_offset = b->offset + b->len; in bio_write()
316 if (write_offset >= b->size) in bio_write()
317 write_offset -= b->size; in bio_write()
320 if (write_offset + rest <= b->size) in bio_write()
324 chunk = b->size - write_offset; in bio_write()
326 memcpy(b->buf + write_offset, buf, chunk); in bio_write()
351 size_t write_offset; in bio_nwrite0() local
377 write_offset = b->offset + b->len; in bio_nwrite0()
378 if (write_offset >= b->size) in bio_nwrite0()
379 write_offset -= b->size; in bio_nwrite0()
380 if (write_offset + num > b->size) in bio_nwrite0()
386 num = b->size - write_offset; in bio_nwrite0()
389 *buf = b->buf + write_offset; in bio_nwrite0()
390 assert(write_offset + num <= b->size); in bio_nwrite0()