Public bug reported:

Some regression was introduced into NVME-related kernel configuration by
32c662c58a9b9 into 4.15-rc2, which was pulled later into ubuntu-
bionic.git

In result, "nvme" and "nvme_core" drivers are built into the kernel, we
can't build them as modules. It caused incompatibility of NMVe-OF target
and initiator modules (nvmet, nvme-rdma) installed by Mellanox OFED with
the inbox "nvme" driver.

Root cause analysis.

In the drivers/lightnvm/Kconfig file - kernel configuration for the OpenChannel 
SSDs (lightnvm) we have:
 
menuconfig NVM
        bool "Open-Channel SSD target support"
        depends on BLOCK && HAS_DMA && PCI
        select BLK_DEV_NVME
        help
          Say Y here to get to enable Open-channel SSDs.
...


It means that BLK_DEV_NVME is selected to "y" when  NVM (CONFIG_NVM) is 
selected.
NVM parameter is 2 state (on / off, i.e. "y" or "no"), it couldn't be built as 
a module.
So that it triggers the change of BLK_DEV_NAME=y and NVME_CORE=y

$ git blame drivers/lightnvm/Kconfig
 
32c662c58a9b9 (Rakesh Pandit   2017-10-13 14:45:55 +0200  7)    depends on 
BLOCK && HAS_DMA && PCI
32c662c58a9b9 (Rakesh Pandit   2017-10-13 14:45:55 +0200  8)    select 
BLK_DEV_NVME

commit 32c662c58a9b9d0c99e713a14ca323a9a91c73a0
Author: Rakesh Pandit <rak...@tuxera.com>
Date:   Fri Oct 13 14:45:55 2017 +0200

    lightnvm: include NVM Express driver if OCSSD is selected for build

    Because NVM needs BLK_DEV_NVME, select it automatically if we mark NVM
    in config file before building kernel.  Also append PCI to depends as
    select doesn't automatically add dependencies.

    Signed-off-by: Rakesh Pandit <rak...@tuxera.com>
    Signed-off-by: Matias Bjørling <m...@bjorling.me>
    Signed-off-by: Jens Axboe <ax...@kernel.dk>

 drivers/lightnvm/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

$ git diff 32c662c58a9b9^1..32c662c58a9b9
diff --git a/drivers/lightnvm/Kconfig b/drivers/lightnvm/Kconfig
index ead61a93cb4e..2a953efec4e1 100644
--- a/drivers/lightnvm/Kconfig
+++ b/drivers/lightnvm/Kconfig
@@ -4,7 +4,8 @@

 menuconfig NVM
        bool "Open-Channel SSD target support"
-       depends on BLOCK && HAS_DMA
+       depends on BLOCK && HAS_DMA && PCI
+       select BLK_DEV_NVME
        help
          Say Y here to get to enable Open-channel SSDs.


Proposed fix is following:

diff --git a/drivers/lightnvm/Kconfig b/drivers/lightnvm/Kconfig
index 2a953efec4e1..9969236314d7 100644
--- a/drivers/lightnvm/Kconfig
+++ b/drivers/lightnvm/Kconfig
@@ -4,8 +4,7 @@

 menuconfig NVM
        bool "Open-Channel SSD target support"
-       depends on BLOCK && HAS_DMA && PCI
-       select BLK_DEV_NVME
+       depends on BLOCK && HAS_DMA && PCI && BLK_DEV_NVME
        help
          Say Y here to get to enable Open-channel SSDs.


Regards, Yurii Shestakov

** Affects: linux (Ubuntu)
     Importance: Undecided
         Status: New

** Patch added: "Fix NVM -> BLK_DEV_NVME dependency bug"
   
https://bugs.launchpad.net/bugs/1759893/+attachment/5095074/+files/fix-nvm-nvme-regression.diff

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1759893

Title:
  regression: nvme and nvme_core couldn't be build as modules starting
  4.15-rc2

Status in linux package in Ubuntu:
  New

Bug description:
  Some regression was introduced into NVME-related kernel configuration
  by 32c662c58a9b9 into 4.15-rc2, which was pulled later into ubuntu-
  bionic.git

  In result, "nvme" and "nvme_core" drivers are built into the kernel,
  we can't build them as modules. It caused incompatibility of NMVe-OF
  target and initiator modules (nvmet, nvme-rdma) installed by Mellanox
  OFED with the inbox "nvme" driver.

  Root cause analysis.

  In the drivers/lightnvm/Kconfig file - kernel configuration for the 
OpenChannel SSDs (lightnvm) we have:
   
  menuconfig NVM
          bool "Open-Channel SSD target support"
          depends on BLOCK && HAS_DMA && PCI
          select BLK_DEV_NVME
          help
            Say Y here to get to enable Open-channel SSDs.
  ...

  
  It means that BLK_DEV_NVME is selected to "y" when  NVM (CONFIG_NVM) is 
selected.
  NVM parameter is 2 state (on / off, i.e. "y" or "no"), it couldn't be built 
as a module.
  So that it triggers the change of BLK_DEV_NAME=y and NVME_CORE=y

  $ git blame drivers/lightnvm/Kconfig
   
  32c662c58a9b9 (Rakesh Pandit   2017-10-13 14:45:55 +0200  7)    depends on 
BLOCK && HAS_DMA && PCI
  32c662c58a9b9 (Rakesh Pandit   2017-10-13 14:45:55 +0200  8)    select 
BLK_DEV_NVME

  commit 32c662c58a9b9d0c99e713a14ca323a9a91c73a0
  Author: Rakesh Pandit <rak...@tuxera.com>
  Date:   Fri Oct 13 14:45:55 2017 +0200

      lightnvm: include NVM Express driver if OCSSD is selected for
  build

      Because NVM needs BLK_DEV_NVME, select it automatically if we mark NVM
      in config file before building kernel.  Also append PCI to depends as
      select doesn't automatically add dependencies.

      Signed-off-by: Rakesh Pandit <rak...@tuxera.com>
      Signed-off-by: Matias Bjørling <m...@bjorling.me>
      Signed-off-by: Jens Axboe <ax...@kernel.dk>

   drivers/lightnvm/Kconfig | 3 ++-
   1 file changed, 2 insertions(+), 1 deletion(-)

  $ git diff 32c662c58a9b9^1..32c662c58a9b9
  diff --git a/drivers/lightnvm/Kconfig b/drivers/lightnvm/Kconfig
  index ead61a93cb4e..2a953efec4e1 100644
  --- a/drivers/lightnvm/Kconfig
  +++ b/drivers/lightnvm/Kconfig
  @@ -4,7 +4,8 @@

   menuconfig NVM
          bool "Open-Channel SSD target support"
  -       depends on BLOCK && HAS_DMA
  +       depends on BLOCK && HAS_DMA && PCI
  +       select BLK_DEV_NVME
          help
            Say Y here to get to enable Open-channel SSDs.

  
  Proposed fix is following:

  diff --git a/drivers/lightnvm/Kconfig b/drivers/lightnvm/Kconfig
  index 2a953efec4e1..9969236314d7 100644
  --- a/drivers/lightnvm/Kconfig
  +++ b/drivers/lightnvm/Kconfig
  @@ -4,8 +4,7 @@

   menuconfig NVM
          bool "Open-Channel SSD target support"
  -       depends on BLOCK && HAS_DMA && PCI
  -       select BLK_DEV_NVME
  +       depends on BLOCK && HAS_DMA && PCI && BLK_DEV_NVME
          help
            Say Y here to get to enable Open-channel SSDs.

  
  Regards, Yurii Shestakov

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1759893/+subscriptions

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to     : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to