]> git.kernelconcepts.de Git - karo-tx-linux.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Mar 2016 23:07:09 +0000 (15:07 -0800)
commita556b804dfa654f054f3d304c2c4d274ffe81f92
tree0e3fa56f60c22de05c2b6704c0d7cd3ba7b761ec
parent9e761c1b436d04823baa161c294fddc524750015
bcache: Change refill_dirty() to always scan entire disk if necessary

commit 627ccd20b4ad3ba836472468208e2ac4dfadbf03 upstream.

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>
Signed-off-by: Jens Axboe <axboe@fb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/bcache/writeback.c