dm writecache: count number of blocks read, not number of read bios
authorMikulas Patocka <mpatocka@redhat.com>
Mon, 11 Jul 2022 20:30:52 +0000 (16:30 -0400)
committerMike Snitzer <snitzer@kernel.org>
Thu, 14 Jul 2022 19:52:32 +0000 (15:52 -0400)
commit2c6e755b49d273243431f5f1184654e71221fc78
tree2b2e5d478aa4a6ab6989f96b5bd4048326aa1bb6
parent9bc0c92e4b82adb017026dbb2aa816b1ac2bef31
dm writecache: count number of blocks read, not number of read bios

Change dm-writecache, so that it counts the number of blocks read
instead of the number of read bios. Bios can be split and requeued
using the dm_accept_partial_bio function, so counting bios caused
inaccurate results.

Fixes: e3a35d03407c ("dm writecache: add event counters")
Reported-by: Yu Kuai <yukuai1@huaweicloud.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Documentation/admin-guide/device-mapper/writecache.rst
drivers/md/dm-writecache.c