• Pavel Emelyanov's avatar
    pagemap: Use pread to read pagemap entries · 593cb59a
    Pavel Emelyanov authored
    When reading pagemaps, we read it from specific position. To
    do it, we called lseek, then read. Fortunetely, there's a
    syscall that does both things in one call -- pread. Since
    we don't need to keep pagemap's position for further reads,
    it perfectly suits our needs.
    
    This removes 75% of lseek calls when dumping basic container.
    Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
    593cb59a
mem.c 7.29 KB