android_kernel_oneplus_msm8998/drivers/md/bcache
Tang Junhui 9b359dd99c bcache: fix miss key refill->end in writeback
commit 2d6cb6edd2c7fb4f40998895bda45006281b1ac5 upstream.

refill->end record the last key of writeback, for example, at the first
time, keys (1,128K) to (1,1024K) are flush to the backend device, but
the end key (1,1024K) is not included, since the bellow code:
	if (bkey_cmp(k, refill->end) >= 0) {
		ret = MAP_DONE;
		goto out;
	}
And in the next time when we refill writeback keybuf again, we searched
key start from (1,1024K), and got a key bigger than it, so the key
(1,1024K) missed.
This patch modify the above code, and let the end key to be included to
the writeback key buffer.

Signed-off-by: Tang Junhui <tang.junhui.linux@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Coly Li <colyli@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-21 09:27:30 +01:00
..
alloc.c bcache: properly set task state in bch_writeback_thread() 2018-05-30 07:48:57 +02:00
bcache.h bcache: fix for data collapse after re-attaching an attached device 2018-05-30 07:48:57 +02:00
bset.c
bset.h
btree.c bcache: fix miss key refill->end in writeback 2018-11-21 09:27:30 +01:00
btree.h
closure.c
closure.h
debug.c
debug.h
extents.c
extents.h
io.c
journal.c
journal.h
Kconfig
Makefile
movinggc.c
request.c bcache: fix kcrashes with fio in RAID5 backend dev 2018-05-30 07:49:02 +02:00
request.h
stats.c
stats.h
super.c bcache: fix for data collapse after re-attaching an attached device 2018-05-30 07:48:57 +02:00
sysfs.c bcache: return attach error when no cache set exist 2018-05-30 07:48:57 +02:00
sysfs.h
trace.c
util.c
util.h
writeback.c bcache: release dc->writeback_lock properly in bch_writeback_thread() 2018-09-09 20:04:36 +02:00
writeback.h