Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

bcache: fix I/O accounting leak in detached_dev_do_request

When a bcache device is detached, discard requests are completed
immediately. However, the I/O accounting started in
cached_dev_make_request() is not ended, leading to 100% disk
utilization reports in iostat. Add the missing bio_end_io_acct() call.

Fixes: cafe56359144 ("bcache: A block layer cache")
Signed-off-by: Shida Zhang <zhangshida@kylinos.cn>
Acked-by: Coly Li <colyli@fnnas.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

Shida Zhang and committed by
Jens Axboe
4da7c5c3 6ea84d7a

+1
+1
drivers/md/bcache/request.c
··· 1107 1107 1108 1108 if (bio_op(orig_bio) == REQ_OP_DISCARD && 1109 1109 !bdev_max_discard_sectors(dc->bdev)) { 1110 + bio_end_io_acct(orig_bio, start_time); 1110 1111 bio_endio(orig_bio); 1111 1112 return; 1112 1113 }