• Josef Bacik's avatar
    Btrfs: don't allocate a seperate csums array for direct reads · c329861d
    Josef Bacik authored
    We've been allocating a big array for csums instead of storing them in the
    io_tree like we do for buffered reads because previously we were locking the
    entire range, so we didn't have an extent state for each sector of the
    range.  But now that we do the range locking as we map the buffers we can
    limit the mapping lenght to sectorsize and use the private part of the
    io_tree for our csums.  This allows us to avoid an extra memory allocation
    for direct reads which could incur latency.  Thanks,
    Signed-off-by: default avatarJosef Bacik <jbacik@fusionio.com>
    c329861d
file-item.c 22.8 KB