diff mbox series

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

Message ID 20220323163815.1526998-1-hch@lst.de (mailing list archive)
State New, archived
Headers show
Series block: don't print I/O error warning for dead disks | expand

Commit Message

Christoph Hellwig March 23, 2022, 4:38 p.m. UTC
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(-)

Comments

Christoph Hellwig April 15, 2022, 4:59 a.m. UTC | #1
ping?

On Wed, Mar 23, 2022 at 05:38:15PM +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.
> 
> 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---
Jens Axboe April 15, 2022, 12:42 p.m. UTC | #2
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,
diff mbox series

Patch

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);
 	}