OSDN Git Service

bcache: correct dirty data statistics
authorTang Junhui <tang.junhui.linux@gmail.com>
Mon, 8 Oct 2018 12:41:12 +0000 (20:41 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Nov 2018 19:08:16 +0000 (11:08 -0800)
commit9e9f19efcb1ce58f2bac949f34dc91060e470472
tree9378413fa7368d6bdcfa3264656f2bab9bbedd22
parent32870e2bb60041867764cc85634c0d9023040e35
bcache: correct dirty data statistics

commit 2e17a262a2371d38d2ec03614a2675a32cef9912 upstream.

When bcache device is clean, dirty keys may still exist after
journal replay, so we need to count these dirty keys even
device in clean status, otherwise after writeback, the amount
of dirty data would be incorrect.

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>
drivers/md/bcache/super.c