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>
Thu, 16 May 2019 17:42:25 +0000 (19:42 +0200)
commitba4e742ac0ab64bc7d6fd917a54dd834b08d6bf1
treeb2320ac0b1fbd183ff2935ec11beec7664313eb9
parentc4d262c26edf53898bb93500b64a74091bdd448c
bcache: correct dirty data statistics

[ Upstream commit 2e17a262a2371d38d2ec03614a2675a32cef9912 ]

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: Sasha Levin <alexander.levin@microsoft.com>
drivers/md/bcache/super.c