From: Josef Bacik Date: Tue, 24 Sep 2013 18:09:34 +0000 (-0400) Subject: Btrfs: do a full search everytime in btrfs_search_old_slot X-Git-Tag: v3.13-rc1~85^2~93 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d4b4087c43cc00a196c5be57fac41f41309f1d56;p=pandora-kernel.git Btrfs: do a full search everytime in btrfs_search_old_slot 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 Signed-off-by: Chris Mason --- Reading git-diff-tree failed