Skip to content
Commit c329861d authored by Josef Bacik's avatar Josef Bacik Committed by Chris Mason
Browse files

Btrfs: don't allocate a seperate csums array for direct reads



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>
parent 99f5944b
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment