From: Josef Bacik Date: Tue, 12 Apr 2011 00:20:11 +0000 (-0400) Subject: Btrfs: avoid taking the chunk_mutex in do_chunk_alloc X-Git-Tag: v2.6.39-rc4~5^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6d74119f1a3efad9dc7f79a16c201242324b731f;p=pandora-kernel.git 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: Josef Bacik Reviewed-by: Liu Bo --- Reading git-diff-tree failed