• Alexandre Oliva's avatar
    Btrfs: try cluster but don't advance in search list · 274bd4fb
    Alexandre Oliva authored
    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>
    274bd4fb
extent-tree.c 203 KB