]> www.infradead.org Git - users/jedix/linux-maple.git/commit
bcache: Change refill_dirty() to always scan entire disk if necessary
authorKent Overstreet <kent.overstreet@gmail.com>
Mon, 30 Nov 2015 02:47:01 +0000 (18:47 -0800)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 26 May 2016 22:43:48 +0000 (15:43 -0700)
commit22aecc267bf975f4056dafd78b9a03046f5eb600
tree8cfda0d718288c3fffad378b5b5ad8b8a03c26b0
parentc5bd5db4fc5590f232ab47ebe40096eb6caa87ea
bcache: Change refill_dirty() to always scan entire disk if necessary

Orabug: 23330614

[ Upstream commit 627ccd20b4ad3ba836472468208e2ac4dfadbf03 ]

Previously, it would only scan the entire disk if it was starting from
the very start of the disk - i.e. if the previous scan got to the end.

This was broken by refill_full_stripes(), which updates last_scanned so
that refill_dirty was never triggering the searched_from_start path.

But if we change refill_dirty() to always scan the entire disk if
necessary, regardless of what last_scanned was, the code gets cleaner
and we fix that bug too.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Jens Axboe <axboe@fb.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
(cherry picked from commit ebd138117e5be089d0e10fea7cb308e8345ed643)

Signed-off-by: Dan Duval <dan.duval@oracle.com>
drivers/md/bcache/writeback.c