Skip to content

Commit 3d973a7

Browse files
Christoph Hellwigaxboe
authored andcommitted
block: don't print I/O error warning for dead disks
When a disk has been marked dead, don't print warnings for I/O errors as they are very much expected. Signed-off-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20220323163815.1526998-1-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent ccf1641 commit 3d973a7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

block/blk-mq.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -794,7 +794,8 @@ bool blk_update_request(struct request *req, blk_status_t error,
794794
#endif
795795

796796
if (unlikely(error && !blk_rq_is_passthrough(req) &&
797-
!(req->rq_flags & RQF_QUIET))) {
797+
!(req->rq_flags & RQF_QUIET)) &&
798+
!test_bit(GD_DEAD, &req->q->disk->state)) {
798799
blk_print_req_error(req, error);
799800
trace_block_rq_error(req, error, nr_bytes);
800801
}

0 commit comments

Comments
 (0)