• C
    Btrfs: process the delayed reference queue in clusters · c3e69d58
    Chris Mason 提交于
    The delayed reference queue maintains pending operations that need to
    be done to the extent allocation tree.  These are processed by
    finding records in the tree that are not currently being processed one at
    a time.
    
    This is slow because it uses lots of time searching through the rbtree
    and because it creates lock contention on the extent allocation tree
    when lots of different procs are running delayed refs at the same time.
    
    This commit changes things to grab a cluster of refs for processing,
    using a cursor into the rbtree as the starting point of the next search.
    This way we walk smoothly through the rbtree.
    Signed-off-by: NChris Mason <chris.mason@oracle.com>
    c3e69d58
disk-io.c 63.9 KB