]> git.baikalelectronics.ru Git - kernel.git/commit
bcache: add io error counting in write_bdev_super_endio()
authorColy Li <colyli@suse.de>
Fri, 28 Jun 2019 11:59:30 +0000 (19:59 +0800)
committerJens Axboe <axboe@kernel.dk>
Fri, 28 Jun 2019 13:39:14 +0000 (07:39 -0600)
commite26b8a082c5799209f23d3e5fa0352f52103e345
treec1b406c4b3772adf5808d8a18b443cf7317f1c4b
parent1b07eeb13e49166435c7dec3eb7ad93b85c7771d
bcache: add io error counting in write_bdev_super_endio()

When backing device super block is written by bch_write_bdev_super(),
the bio complete callback write_bdev_super_endio() simply ignores I/O
status. Indeed such write request also contribute to backing device
health status if the request failed.

This patch checkes bio->bi_status in write_bdev_super_endio(), if there
is error, bch_count_backing_io_errors() will be called to count an I/O
error to dc->io_errors.

Signed-off-by: Coly Li <colyli@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/md/bcache/super.c