]> 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>
Thu, 29 Aug 2013 01:01:24 +0000 (18:01 -0700)
committerKent Overstreet <kmo@daterainc.com>
Tue, 3 Sep 2013 20:42:35 +0000 (13:42 -0700)
commitbef0ef06a9fe34b08177b67d3213dceab29d3abe
treee85d390ca49131a79b3824b5b09b179a74876d66
parentb5a1a5cfffbcf355f52e67a9b57db4914395ca70
bcache: Fix for handling overlapping extents when reading in a btree node

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>
Cc: linux-stable <stable@vger.kernel.org> # >= v3.10
drivers/md/bcache/bset.c