From: Kent Overstreet Date: Fri, 12 Jul 2013 05:42:14 +0000 (-0700) Subject: bcache: Journal replay fix X-Git-Tag: v3.11-rc3~32^2^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=faa5673617656ee58369a3cfe4a312cfcdc59c81;p=pandora-kernel.git bcache: Journal replay fix The journal replay code starts by finding something that looks like a valid journal entry, then it does a binary search over the unchecked region of the journal for the journal entries with the highest sequence numbers. Trouble is, the logic was wrong - journal_read_bucket() returns true if it found journal entries we need, but if the range of journal entries we're looking for loops around the end of the journal - in that case journal_read_bucket() could return true when it hadn't found the highest sequence number we'd seen yet, and in that case the binary search did the wrong thing. Whoops. Signed-off-by: Kent Overstreet Cc: linux-stable # >= v3.10 --- Reading git-diff-tree failed