[PATCH] block: don't print I/O error warning for dead disks

Subsystems: block layer, the rest

STALE1647d LANDED

Landed in mainline as 3d973a76e54c on 2022-04-15.

3 messages, 2 authors, 2022-04-15 · open the first message on its own page

[PATCH] block: don't print I/O error warning for dead disks

From: Christoph Hellwig <hch@lst.de>
Date: 2022-03-23 16:38:22

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>
---
 block/blk-mq.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 8e659dc5fcf37..5b6a7c9d0d992 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -794,7 +794,8 @@ bool blk_update_request(struct request *req, blk_status_t error,
 #endif
 
 	if (unlikely(error && !blk_rq_is_passthrough(req) &&
-		     !(req->rq_flags & RQF_QUIET))) {
+		     !(req->rq_flags & RQF_QUIET)) &&
+		     !test_bit(GD_DEAD, &req->q->disk->state)) {
 		blk_print_req_error(req, error);
 		trace_block_rq_error(req, error, nr_bytes);
 	}
-- 
2.30.2

Re: [PATCH] block: don't print I/O error warning for dead disks

From: Christoph Hellwig <hch@lst.de>
Date: 2022-04-15 05:07:03

ping?

On Wed, Mar 23, 2022 at 05:38:15PM +0100, Christoph Hellwig wrote:
quoted hunk
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>
---
 block/blk-mq.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 8e659dc5fcf37..5b6a7c9d0d992 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -794,7 +794,8 @@ bool blk_update_request(struct request *req, blk_status_t error,
 #endif
 
 	if (unlikely(error && !blk_rq_is_passthrough(req) &&
-		     !(req->rq_flags & RQF_QUIET))) {
+		     !(req->rq_flags & RQF_QUIET)) &&
+		     !test_bit(GD_DEAD, &req->q->disk->state)) {
 		blk_print_req_error(req, error);
 		trace_block_rq_error(req, error, nr_bytes);
 	}
-- 
2.30.2
---end quoted text---

Re: [PATCH] block: don't print I/O error warning for dead disks

From: Jens Axboe <axboe@kernel.dk>
Date: 2022-04-15 12:42:39

On Wed, 23 Mar 2022 17:38:15 +0100, Christoph Hellwig wrote:
When a disk has been marked dead, don't print warnings for I/O errors
as they are very much expected.
Applied, thanks!

[1/1] block: don't print I/O error warning for dead disks
      commit: 3d973a76e54c30772e72128ab0552ca75e588893

Best regards,
-- 
Jens Axboe

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help