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

Btrfs: avoid taking the chunk_mutex in do_chunk_alloc



Everytime we try to allocate disk space we try and see if we can pre-emptively
allocate a chunk, but in the common case we don't allocate anything, so there is
no sense in taking the chunk_mutex at all.  So instead if we are allocating a
chunk, mark it in the space_info so we don't get two people trying to allocate
at the same time.  Thanks,

Signed-off-by: default avatarJosef Bacik <josef@redhat.com>
Reviewed-by: default avatarLiu Bo <liubo2009@cn.fujitsu.com>
parent 0d399205
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