]> git.karo-electronics.de Git - karo-tx-linux.git/commit
bcache: Fix for handling overlapping extents when reading in a btree node
authorKent Overstreet <kmo@daterainc.com>
Tue, 24 Sep 2013 06:17:35 +0000 (23:17 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 5 Oct 2013 14:13:09 +0000 (07:13 -0700)
commitdf8b0d944cae63df86dba0edaa8fa8f5efaa7e03
tree350da3f4b0ef9e6b05b07404f0b1df06c31b975e
parent7866bece346caecd88c53c6603e178ce4ebda87b
bcache: Fix for handling overlapping extents when reading in a btree node

commit 84786438ed17978d72eeced580ab757e4da8830b upstream.

btree_sort_fixup() was overly clever, because it was trying to avoid
pulling a key off the btree iterator in more than one place.

This led to a really obscure bug where we'd break early from the loop in
btree_sort_fixup() if the current key overlapped with keys in more than
one older set, and the next key it overlapped with was zero size.

Signed-off-by: Kent Overstreet <kmo@daterainc.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/bcache/bset.c