From patchwork Tue Nov 22 14:21:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jinlong Chen X-Patchwork-Id: 24404 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2231255wrr; Tue, 22 Nov 2022 06:26:33 -0800 (PST) X-Google-Smtp-Source: AA0mqf7Qe49PcV1+bA+NOJt3ytZ3BuWNterEDyd+rGQCHeF+NEK1r1ztZzrQflCseBO4p2nwyd3/ X-Received: by 2002:a05:6402:1767:b0:469:4606:e2a2 with SMTP id da7-20020a056402176700b004694606e2a2mr13370880edb.232.1669127193368; Tue, 22 Nov 2022 06:26:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669127193; cv=none; d=google.com; s=arc-20160816; b=lHldQFWhBzFh0knKP8u5K05X1t9br/WZgvPYpG95MlfVBOeMBoVxH9sbzRlnFjBzch CdzsleQjqk6nKosEx2oIfnhBbQR9TWx1z+OJ+LtzS79LwQhGmSHUxCXS1AbkdcCR6i3K lHOJg/Murl8h6dSODHxEGABR+9vQCGxhuVXDY87dzh8OCefnlIkN1yyUtgs5S2ewXZ5F HAgPWxdDc4UZWLxMU+7RsWWxAiQO84+8VO8wKoiB74nxhVN7GW63uXL+7bA4XGFgg6KS zivm73h4KwnW/KKLaU9/nahiZACangyatz7FRRcUJ0YM+AnUoDnG2SPAqc4DinZ65Zis cg9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=I2UhijnCzcPzoMeQF7uO0bnhSe4uRy/HGGDiLwpaOVA=; b=Z32N6oLlR7I1X3Gggh+e+22GYEoyaoR7FiUAWxt+obKKev7l6bUfkjWTdrbF5Qhdrp v9Z/RI8q8cLZ9KIPVf47VDWcT0zqTETyhcNcRlFZnvayJKsWMNXnFDfQ8QLij+DSCO6x 7d2gwjBYKKrrE2FZqrW0ICEqLpEvfEal9iLV8/dqI9YsG/IXQM+3lRPZl1U4Wb2VXnxp NsM17yfXHALGLJEvEJudc0LOBcjnUphdx+MFnnzj9/i01vuomNIPTnPt51BU+k3lFIrs +PIO/HVmBnrrESbSlzDaJucQDCCRFMoDXTCVn9GqPSxraD0nVp4v6yn8Xyep4+CvMQHI 3+/Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z14-20020a056402274e00b00469a45ae32csi5647369edd.562.2022.11.22.06.26.09; Tue, 22 Nov 2022 06:26:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233416AbiKVOVw (ORCPT + 99 others); Tue, 22 Nov 2022 09:21:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40782 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233070AbiKVOVq (ORCPT ); Tue, 22 Nov 2022 09:21:46 -0500 Received: from zju.edu.cn (mail.zju.edu.cn [61.164.42.155]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E4CD86829C; Tue, 22 Nov 2022 06:21:44 -0800 (PST) Received: from localhost.localdomain (unknown [10.14.30.50]) by mail-app4 (Coremail) with SMTP id cS_KCgCHrN_o2nxjHR5BCA--.15646S4; Tue, 22 Nov 2022 22:21:41 +0800 (CST) From: Jinlong Chen To: axboe@kernel.dk Cc: hch@lst.de, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, nickyc975@zju.edu.cn Subject: [PATCH 2/4] elevator: printk a warning if switching to a new io scheduler fails Date: Tue, 22 Nov 2022 22:21:24 +0800 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 X-CM-TRANSID: cS_KCgCHrN_o2nxjHR5BCA--.15646S4 X-Coremail-Antispam: 1UD129KBjvdXoW7Jw4fGw4rGFykXry5uw18AFb_yoWxtrb_G3 y8K3Z7Jan8Gr4Yyr1fKF1YqF10vwn3JFy5Ww42qrn3J3W29Fyvyr10vr1xCr1kWFWUG3W3 Jw4q9rnrZw13KjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbs8Fc2x0x2IEx4CE42xK8VAvwI8IcIk0rVWrJVCq3wAFIxvE14AK wVWUJVWUGwA2ocxC64kIII0Yj41l84x0c7CEw4AK67xGY2AK021l84ACjcxK6xIIjxv20x vE14v26w1j6s0DM28EF7xvwVC0I7IYx2IY6xkF7I0E14v26r4UJVWxJr1l84ACjcxK6I8E 87Iv67AKxVW0oVCq3wA2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_GcCE3s1lnxkEFVAIw20F6c xK64vIFxWle2I262IYc4CY6c8Ij28IcVAaY2xG8wAqx4xG64xvF2IEw4CE5I8CrVC2j2Wl Yx0E2Ix0cI8IcVAFwI0_Jr0_Jr4lYx0Ex4A2jsIE14v26r1j6r4UMcvjeVCFs4IE7xkEbV WUJVW8JwACjcxG0xvY0x0EwIxGrwACjI8F5VA0II8E6IAqYI8I648v4I1l42xK82IYc2Ij 64vIr41l42xK82IY6x8ErcxFaVAv8VW8uw4UJr1UMxC20s026xCaFVCjc4AY6r1j6r4UMI 8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67AK xVWUAVWUtwCIc40Y0x0EwIxGrwCI42IY6xIIjxv20xvE14v26r1j6r1xMIIF0xvE2Ix0cI 8IcVCY1x0267AKxVW8JVWxJwCI42IY6xAIw20EY4v20xvaj40_Jr0_JF4lIxAIcVC2z280 aVAFwI0_Jr0_Gr1lIxAIcVC2z280aVCY1x0267AKxVW8JVW8JrUvcSsGvfC2KfnxnUUI43 ZEXa7VUbHa0DUUUUU== X-CM-SenderInfo: qssqjiaqqzq6lmxovvfxof0/1tbiAg4CB1ZdtciuiQAAsY X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750206716109691317?= X-GMAIL-MSGID: =?utf-8?q?1750206716109691317?= printk a warning to indicate that the io scheduler has been set to none if switching to a new io scheduler fails. Signed-off-by: Jinlong Chen Reviewed-by: Christoph Hellwig --- block/elevator.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/block/elevator.c b/block/elevator.c index 01aa9f38f22e..1fa45717b1d6 100644 --- a/block/elevator.c +++ b/block/elevator.c @@ -683,6 +683,12 @@ int elevator_switch(struct request_queue *q, struct elevator_type *new_e) out_unfreeze: blk_mq_unquiesce_queue(q); blk_mq_unfreeze_queue(q); + + if (ret) { + pr_warn("elv: switch to \"%s\" failed, falling back to \"none\"\n", + new_e->elevator_name); + } + return ret; }