linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* ERROR: "scsi_device_from_queue" [drivers/md/dm-multipath.ko] undefined!
@ 2018-03-10 19:29 kbuild test robot
  2018-03-12 15:40 ` Mike Snitzer
  0 siblings, 1 reply; 2+ messages in thread
From: kbuild test robot @ 2018-03-10 19:29 UTC (permalink / raw)
  To: Mike Snitzer; +Cc: kbuild-all, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 800 bytes --]

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 27612 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: ERROR: "scsi_device_from_queue" [drivers/md/dm-multipath.ko] undefined!
  2018-03-10 19:29 ERROR: "scsi_device_from_queue" [drivers/md/dm-multipath.ko] undefined! kbuild test robot
@ 2018-03-12 15:40 ` Mike Snitzer
  0 siblings, 0 replies; 2+ messages in thread
From: Mike Snitzer @ 2018-03-12 15:40 UTC (permalink / raw)
  To: hare, Martin K. Petersen, Ewan Milne, linux-scsi
  Cc: kbuild-all, linux-kernel, kbuild test robot, dm-devel

On Sat, Mar 10 2018 at  2:29pm -0500,
kbuild test robot <fengguang.wu@intel.com> 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 *,

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-03-12 15:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-10 19:29 ERROR: "scsi_device_from_queue" [drivers/md/dm-multipath.ko] undefined! kbuild test robot
2018-03-12 15:40 ` Mike Snitzer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).