From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B7993C4361B for ; Tue, 8 Dec 2020 17:56:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8F90523B3E for ; Tue, 8 Dec 2020 17:56:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730858AbgLHR4I (ORCPT ); Tue, 8 Dec 2020 12:56:08 -0500 Received: from netrider.rowland.org ([192.131.102.5]:48915 "HELO netrider.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1730325AbgLHR4H (ORCPT ); Tue, 8 Dec 2020 12:56:07 -0500 Received: (qmail 1305181 invoked by uid 1000); 8 Dec 2020 12:55:26 -0500 Date: Tue, 8 Dec 2020 12:55:26 -0500 From: Alan Stern To: Stephen Rothwell Cc: "Martin K. Petersen" , Bart Van Assche , Can Guo , Christoph Hellwig , Hannes Reinecke , Jens Axboe , Stanley Chu , Linux Kernel Mailing List , Linux Next Mailing List Subject: Re: linux-next: build failure after merge of the scsi-mkp tree Message-ID: <20201208175526.GH1298255@rowland.harvard.edu> References: <20201208202853.186ae136@canb.auug.org.au> <20201208203859.686f83eb@canb.auug.org.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201208203859.686f83eb@canb.auug.org.au> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 08, 2020 at 08:38:59PM +1100, Stephen Rothwell wrote: > Hi all, > > On Tue, 8 Dec 2020 20:28:53 +1100 Stephen Rothwell wrote: > > > > Hi all, > > > > After merging the scsi-mkp tree, today's linux-next build (sparc64 > > defconfig) failed like this: > > > > drivers/mtd/nand/raw/intel-nand-controller.c:17:10: fatal error: linux/mtd/nand_ecc.h: No such file or directory > > 17 | #include > > | ^~~~~~~~~~~~~~~~~~~~~~ > > Clearly, it did not fail like that :-) > > block/blk-core.c: In function 'blk_queue_enter': > block/blk-core.c:443:18: error: 'struct request_queue' has no member named 'rpm_status'; did you mean 'stats'? > if ((pm && q->rpm_status != RPM_SUSPENDED) || > ^~~~~~~~~~ > stats > > > Caused by commit > > > > 81a395cdc176 ("scsi: block: Do not accept any requests while suspended") > > > > # CONFIG_PM is not set > > > > I have applied the following patch: > > > > From: Stephen Rothwell > > Date: Tue, 8 Dec 2020 20:12:33 +1100 > > Subject: [PATCH] scsi: block: fix for "scsi: block: Do not accept any requests while suspended" > > > > Fixes: 81a395cdc176 ("scsi: block: Do not accept any requests while suspended") > > Signed-off-by: Stephen Rothwell > > --- > > block/blk-core.c | 18 ++++++++++++++---- > > 1 file changed, 14 insertions(+), 4 deletions(-) > > > > diff --git a/block/blk-core.c b/block/blk-core.c > > index a71a5c9429d6..9c9aec1382be 100644 > > --- a/block/blk-core.c > > +++ b/block/blk-core.c > > @@ -421,6 +421,18 @@ void blk_cleanup_queue(struct request_queue *q) > > } > > EXPORT_SYMBOL(blk_cleanup_queue); > > > > +#ifdef CONFIG_PM > > +static bool rq_suspended(struct request_queue *q) > > +{ > > + return q->rpm_status == RPM_SUSPENDED; > > +} > > +#else > > +static bool rq_suspended(struct request_queue *q) > > +{ > > + return false; > > +} > > +#endif > > + > > /** > > * blk_queue_enter() - try to increase q->q_usage_counter > > * @q: request queue pointer > > @@ -440,12 +452,10 @@ int blk_queue_enter(struct request_queue *q, blk_mq_req_flags_t flags) > > * responsible for ensuring that that counter is > > * globally visible before the queue is unfrozen. > > */ > > - if ((pm && q->rpm_status != RPM_SUSPENDED) || > > - !blk_queue_pm_only(q)) { > > + if ((pm && !rq_suspended(q)) || !blk_queue_pm_only(q)) > > success = true; > > - } else { > > + else > > percpu_ref_put(&q->q_usage_counter); > > - } > > } > > rcu_read_unlock(); Yes, that certainly is the proper fix. It's all to easy to miss these issues that depend on your kernel configuration. Bart, can you fold it into a new version of the patch? Alan Stern