Skip to content
Commit 5138ac67 authored by Coly Li's avatar Coly Li Committed by Jens Axboe
Browse files

bcache: fix misleading error message in bch_count_io_errors()



Bcache only does recoverable I/O for read operations by calling
cached_dev_read_error(). For write opertions there is no I/O recovery for
failed requests.

But in bch_count_io_errors() no matter read or write I/Os, before errors
counter reaches io error limit, pr_err() always prints "IO error on %,
recoverying". For write requests this information is misleading, because
there is no I/O recovery at all.

This patch adds a parameter 'is_read' to bch_count_io_errors(), and only
prints "recovering" by pr_err() when the bio direction is READ.

Signed-off-by: default avatarColy Li <colyli@suse.de>
Reviewed-by: default avatarMichael Lyle <mlyle@lyle.org>
Reviewed-by: default avatarTang Junhui <tang.junhui@zte.com.cn>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 2831231d
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment