• Z
    btrfs: reada: limit max works count · 2fefd558
    Zhao Lei 提交于
    Reada creates 2 works for each level of tree recursively.
    
    In case of a tree having many levels, the number of created works
    is 2^level_of_tree.
    Actually we don't need so many works in parallel, this patch limits
    max works to BTRFS_MAX_MIRRORS * 2.
    
    The per-fs works_counter will be also used for btrfs_reada_wait() to
    check is there are background workers.
    Signed-off-by: NZhao Lei <zhaolei@cn.fujitsu.com>
    Signed-off-by: NDavid Sterba <dsterba@suse.com>
    2fefd558
disk-io.c 121.6 KB