Skip to content
Commit 274bd4fb authored by Alexandre Oliva's avatar Alexandre Oliva Committed by Chris Mason
Browse files

Btrfs: try cluster but don't advance in search list



When we find an existing cluster, we switch to its block group as the
current block group, possibly skipping multiple blocks in the process.
Furthermore, under heavy contention, multiple threads may fail to
allocate from a cluster and then release just-created clusters just to
proceed to create new ones in a different block group.

This patch tries to allocate from an existing cluster regardless of its
block group, and doesn't switch to that group, instead proceeding to
try to allocate a cluster from the group it was iterating before the
attempt.

Signed-off-by: default avatarAlexandre Oliva <oliva@lsd.ic.unicamp.br>
Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
parent 062c05c4
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