Function batch_span
pub fn batch_span(offset: u64, body_len: usize, pipelined: bool) -> u64Expand description
How far the next batch starts from a batch of body_len bytes placed
at offset (a multiple of 8): the body rounded up to 8 bytes, or, when
pipelined, up to the end of the block it ends in, so that the next
batch starts on a block boundary even when this one did not. Writes in
flight together then never share a block, which O_DIRECT (whole-block
writes) needs. A batch that would grow past MAX_BATCH that way keeps
the 8-byte rounding.