]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: reada: Fix in-segment calculation for reada
authorZhao Lei <zhaolei@cn.fujitsu.com>
Fri, 18 Dec 2015 13:33:05 +0000 (21:33 +0800)
committerDavid Sterba <dsterba@suse.com>
Tue, 16 Feb 2016 12:21:45 +0000 (13:21 +0100)
commit40e9c6ecbb2b3d60fecdf0b4eb512c1849ba4d96
treec2904b3fad25ef1662a2c4ad6623fd2bdaf75317
parent2827ae15dc0f2c90e519a70f2b9ddebe33f2361f
btrfs: reada: Fix in-segment calculation for reada

reada_zone->end is end pos of segment:
 end = start + cache->key.offset - 1;

So we need to use "<=" in condition to judge is a pos in the
segment.

The problem happened rearly, because logical pos rarely pointed
to last 4k of a blockgroup, but we need to fix it to make code
right in logic.

Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/reada.c