diff options
author | Josef Bacik <jbacik@fusionio.com> | 2013-09-24 14:09:34 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-12-20 07:49:08 -0800 |
commit | 794d0e92d22e8dd6495d22674272e17fd3cc33fa (patch) | |
tree | 43dab278ba9718b882a20d3c5ad27f6cdd030f87 /scripts/patch-kernel | |
parent | dd1bb90a43e858e478d71079877f5df1d6758f08 (diff) |
Btrfs: do a full search everytime in btrfs_search_old_slot
commit d4b4087c43cc00a196c5be57fac41f41309f1d56 upstream.
While running some snashot aware defrag tests I noticed I was panicing every
once and a while in key_search. This is because of the optimization that says
if we find a key at slot 0 it will be at slot 0 all the way down the rest of the
tree. This isn't the case for btrfs_search_old_slot since it will likely replay
changes to a buffer if something has changed since we took our sequence number.
So short circuit this optimization by setting prev_cmp to -1 every time we call
key_search so we will do our normal binary search. With this patch I am no
longer seeing the panics I was seeing before. Thanks,
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/patch-kernel')
0 files changed, 0 insertions, 0 deletions