Message ID | d51ed0fb457db7a4f9cbb0dbce36d534e22be457.1669126766.git.nickyc975@zju.edu.cn |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> 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 <rfc822;cjcooper78@gmail.com> + 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 <rfc822;linux-kernel@vger.kernel.org>); 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 <nickyc975@zju.edu.cn> 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: <d51ed0fb457db7a4f9cbb0dbce36d534e22be457.1669126766.git.nickyc975@zju.edu.cn> X-Mailer: git-send-email 2.34.1 In-Reply-To: <cover.1669126766.git.nickyc975@zju.edu.cn> References: <cover.1669126766.git.nickyc975@zju.edu.cn> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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: <linux-kernel.vger.kernel.org> 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?= |
Series |
random improvments and cleanups for elevator.c
|
|
Commit Message
Jinlong Chen
Nov. 22, 2022, 2:21 p.m. UTC
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 <nickyc975@zju.edu.cn>
---
block/elevator.c | 6 ++++++
1 file changed, 6 insertions(+)
Comments
> > 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 <nickyc975@zju.edu.cn> > --- > 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; > } > Hi, Jens! This patch is suggested by Christoph, but I forgot to add the Suggested-by tag. Would you please add "Suggested-by: Christoph Hellwig <hch@lst.de>" if you apply the patch? Thanks! Jinlong Chen
Looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
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; }