]> git.baikalelectronics.ru Git - kernel.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)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 24 Sep 2013 21:41:43 +0000 (14:41 -0700)
commit52d4eb086cb3efba677243a203ca7345cb87186c
treec23d3b88414deb9b3c83a971fe78d8bac6485ccb
parente630e5355c5c0bed3cd5c7f0ad152b5d7cccd3fa
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
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/md/bcache/bset.c