1. pub fn readahead(fd: libc::c_int, mut offset: u64, end: u64) {
    2. let mut count;
    3. offset = round_down_4k(offset);
    4. loop {
    5. if offset >= end {
    6. break;
    7. }
    8. // Kernel default 128KB readahead size
    9. count = std::cmp::min(128 << 10, end - offset);
    10. unsafe { libc::readahead(fd, offset as i64, count as usize) };
    11. offset += count;
    12. }
    13. }