]> git.baikalelectronics.ru Git - kernel.git/commit
dm: properly fix redundant bio-based IO accounting
authorMike Snitzer <snitzer@redhat.com>
Fri, 28 Jan 2022 15:58:41 +0000 (10:58 -0500)
committerJens Axboe <axboe@kernel.dk>
Fri, 28 Jan 2022 19:28:15 +0000 (12:28 -0700)
commit49807188ade1cc7322ad86144c85c0d559cf5c33
treea6872f00546c3ee5ae32a73dadc02712a7c27b65
parent7428e1ebbd681989ea1e16e3ce49272c996c17d2
dm: properly fix redundant bio-based IO accounting

Record the start_time for a bio but defer the starting block core's IO
accounting until after IO is submitted using bio_start_io_acct_time().

This approach avoids the need to mess around with any of the
individual IO stats in response to a bio_split() that follows bio
submission.

Reported-by: Bud Brown <bubrown@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Cc: stable@vger.kernel.org
Depends-on: 4d21f530299b ("block: add bio_start_io_acct_time() to control start_time")
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Link: https://lore.kernel.org/r/20220128155841.39644-4-snitzer@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/md/dm.c