Received: by 10.213.65.68 with SMTP id h4csp124254imn; Mon, 12 Mar 2018 08:41:30 -0700 (PDT) X-Google-Smtp-Source: AG47ELspexFqFTD/6oM/NzK18SqMambv8pIPcnD1pmTwSdZX6nXBCvqtdbF8Qr8DB/uYG+td6AO+ X-Received: by 2002:a17:902:7593:: with SMTP id j19-v6mr8486168pll.408.1520869290860; Mon, 12 Mar 2018 08:41:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520869290; cv=none; d=google.com; s=arc-20160816; b=zffwm3jtgo4pdvE7e4CXb8bE57q/d7Ns+Y5JmALXFR59sMm5eInsmJB4MA/cpLDiXV jXxR5QzJ0Pb5kmZ3ymM36xug4RRLWOhEGoydubRse17GJaXR/wp9NqyklwR/kMD1pQRm R2e2ttf2xJPnGNonW4MlvG/ySdTOxnR2w75tWaS7bn0ODmwIv1HQZ+EUCCiEo+F4vrID Y7H4vkokJPK1mO8kW8YO98SX1Tz7ypWDqYLSfzKbDVEjTDf31UF1Ap1hN4ySkUR5kAZb QkrUeNh3GCWJJUdwiRjQaCQFEuh+vGV/uGWpQ2XDl2JABRN/azdglfBJ6ACyTwsdPJjf sx3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=EL4Dga3bl2Cb3H/ISOa+XRW7TlkZlZpxmteWvufDj94=; b=z2u5A5lzH2n4lkUKGz+64eE6NRKRHsE+QAno+/a5UMOCDKd8pRXNOVV+5hMOBOgQYv 5YBle058p/FKUSUvzLs/NPTpQzb925+tU8YR3olJmTkFBz7vcKXCOSpQFf3qql1jfGAd bPEDqpFiLflt8Q0mSu8EzQAM5ZFaEMp6yRrecviXT474NLwwvBlsOdlPYzzVmeathquI Y66FfWS5TJ/AafUsldJmsm5kXvWdEMA4VoPGwxTfiW8sv4MCvOaDBPhCcqptOlo9+dRL 42dHuts3zd/ZsbmGJplpXSkYut2/Vev/isrOoq3aAxShJJ++lUUj9eDKGc/pAwfjXvej mT8w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w20-v6si5765065plp.638.2018.03.12.08.41.15; Mon, 12 Mar 2018 08:41:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751787AbeCLPkU (ORCPT + 99 others); Mon, 12 Mar 2018 11:40:20 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:49388 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751458AbeCLPkS (ORCPT ); Mon, 12 Mar 2018 11:40:18 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9B90CE44B5; Mon, 12 Mar 2018 15:40:17 +0000 (UTC) Received: from localhost (unknown [10.18.25.149]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3DB1A2166BAE; Mon, 12 Mar 2018 15:40:17 +0000 (UTC) Date: Mon, 12 Mar 2018 11:40:16 -0400 From: Mike Snitzer To: hare@suse.de, "Martin K. Petersen" , Ewan Milne , linux-scsi@vger.kernel.org Cc: kbuild-all@01.org, linux-kernel@vger.kernel.org, kbuild test robot , dm-devel@redhat.com Subject: Re: ERROR: "scsi_device_from_queue" [drivers/md/dm-multipath.ko] undefined! Message-ID: <20180312154016.GA29395@redhat.com> References: <201803110354.yaesL1Mi%fengguang.wu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201803110354.yaesL1Mi%fengguang.wu@intel.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Mon, 12 Mar 2018 15:40:17 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Mon, 12 Mar 2018 15:40:17 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'msnitzer@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Mar 10 2018 at 2:29pm -0500, kbuild test robot wrote: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master > head: 3266b5bd97eaa72793df0b6e5a106c69ccc166c4 > commit: 8d47e65948ddea4398892946d9e50778a316b397 dm mpath: remove unnecessary NVMe branching in favor of scsi_dh checks > date: 4 days ago > config: x86_64-randconfig-x004-201810 (attached as .config) > compiler: gcc-7 (Debian 7.3.0-1) 7.3.0 > reproduce: > git checkout 8d47e65948ddea4398892946d9e50778a316b397 > # save the attached .config to linux build tree > make ARCH=x86_64 > > All errors (new ones prefixed by >>): > > >> ERROR: "scsi_device_from_queue" [drivers/md/dm-multipath.ko] undefined! > > --- > 0-DAY kernel test infrastructure Open Source Technology Center > https://lists.01.org/pipermail/kbuild-all Intel Corporation This error is due to CONFIG_SCSI not being set. DM commit 8d47e6594 ("dm mpath: remove unnecessary NVMe branching in favor of scsi_dh checks") updated dm-mpath.c to call scsi_device_from_queue() to determine if a device is SCSI. The following patch fixes the buildbot reported case when CONFIG_SCSI isn't set... but it is unclear if this is the best way forward. I don't want to make CONFIG_DM_MULTIPATH depend on CONFIG_SCSI, as such we either need the following patch or the equivalent in a dm-mpath.c wrapper. Thoughts? diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index 7ae177c..d6bcc96 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h @@ -333,7 +333,14 @@ extern int scsi_add_device(struct Scsi_Host *host, uint channel, extern int scsi_unregister_device_handler(struct scsi_device_handler *scsi_dh); void scsi_attach_vpd(struct scsi_device *sdev); +#ifdef CONFIG_SCSI extern struct scsi_device *scsi_device_from_queue(struct request_queue *q); +#else +static inline struct scsi_device *scsi_device_from_queue(struct request_queue *q) +{ + return NULL; +} +#endif extern int __must_check scsi_device_get(struct scsi_device *); extern void scsi_device_put(struct scsi_device *); extern struct scsi_device *scsi_device_lookup(struct Scsi_Host *,