From patchwork Wed Mar 23 16:38:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 12789941 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 96EDAC433EF for ; Wed, 23 Mar 2022 16:38:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236146AbiCWQjt (ORCPT ); Wed, 23 Mar 2022 12:39:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40212 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231493AbiCWQjr (ORCPT ); Wed, 23 Mar 2022 12:39:47 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF5E76541 for ; Wed, 23 Mar 2022 09:38:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:In-Reply-To:References; bh=F6ZxHPxQkAvi8SSVUYKhrpEuw9qJyFA484+C2OJlw/A=; b=gSxPQMAHoePp42mReEuwhyK6xq LG5lY0iTOljWnJo7bbVqFb7ZBRBwll3LWZgQWrKh1jNlym4KM2YaPJF+rzEjB7d9Ixz4zXJH/Scvp H5DjLY73faEI4ag/w5EztxqXKzmYZprSthBsnc0sHxmyqAVnTucZLnJ/JvKscySboc6p0fWs+54zJ +glmbPVznZg5m+9XS5AZyCdeo8wcW54aKo1v27dVmqD3S70QAsezies6R7cYypBf8kloOnKJyvgwm J2TQLPb1jES1XVSllGCyrDUw2/B/s9QbH96f0KiihSQ+RKqE1nE7gy4YrN8jB8aDdJZo4xzIitOSe S5IbZV+w==; Received: from [2001:4bb8:19a:b822:f080:d126:bfe4:c36c] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nX400-00EHJp-Vs; Wed, 23 Mar 2022 16:38:17 +0000 From: Christoph Hellwig To: axboe@kernel.dk Cc: linux-block@vger.kernel.org Subject: [PATCH] block: don't print I/O error warning for dead disks Date: Wed, 23 Mar 2022 17:38:15 +0100 Message-Id: <20220323163815.1526998-1-hch@lst.de> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org 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 --- 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); }