• J
    Btrfs: set range_start to the right start in count_range_bits · af60bed2
    Josef Bacik 提交于
    In count_range_bits we are adjusting total_bytes based on the range we are
    searching for, but we don't adjust the range start according to the range we are
    searching for, which makes for weird results.  For example, if the range
    
    [0-8192]
    
    is set DELALLOC, but I search for 4096-8192, I will get back 4096 for the number
    of bytes found, but the range_start will be 0, which makes it look like the
    range is [0-4096].  So instead set range_start = max(cur_start, state->start).
    This makes everything come out right.  Thanks,
    Signed-off-by: NJosef Bacik <josef@redhat.com>
    af60bed2
extent_io.c 99.4 KB