diff options
author | Naohiro Aota <naota@elisp.net> | 2015-06-30 04:25:43 +0200 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2015-08-09 15:17:02 +0200 |
commit | dd81d459a37d73cfa39896bd070e7b92e66e3628 (patch) | |
tree | 993856780c7913312bbe2676ffa721ab11b1091e /fs/btrfs/tree-log.c | |
parent | Btrfs: teach backref walking about backrefs with underflowed offset values (diff) | |
download | linux-dd81d459a37d73cfa39896bd070e7b92e66e3628.tar.xz linux-dd81d459a37d73cfa39896bd070e7b92e66e3628.zip |
btrfs: fix search key advancing condition
The search key advancing condition used in copy_to_sk() is loose. It can
advance the key even if it reaches sk->max_*: e.g. when the max key = (512,
1024, -1) and the current key = (512, 1025, 10), it increments the
offset by 1, continues hopeless search from (512, 1025, 11). This issue
make ioctl() to take unexpectedly long time scanning all the leaf a blocks
one by one.
This commit fix the problem using standard way of key comparison:
btrfs_comp_cpu_keys()
Signed-off-by: Naohiro Aota <naota@elisp.net>
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions