diff mbox

[SRU,Bionic,0/1] Fix for Bionic build error (LP: #1838533)

Message ID 20190731162810.8316-1-kleber.souza@canonical.com
State New
Headers show

Commit Message

Kleber Sacilotto de Souza July 31, 2019, 4:28 p.m. UTC
[Impact]

When compiling bionic linux 4.15.0-56.62 with CONFIG_NVM disabled, it fails with:

make[5]: *** [drivers/nvme/host/core.o] Error 1
make[5]: *** Waiting for unfinished jobs....
In file included from /tmp/kernel-kleber-57dc2e6-NQe1/build/drivers/nvme/host/multipath.c:15:0:
/tmp/kernel-kleber-57dc2e6-NQe1/build/drivers/nvme/host/nvme.h: In function
'nvme_nvm_register_sysfs':
/tmp/kernel-kleber-57dc2e6-NQe1/build/drivers/nvme/host/nvme.h:502:6: error:
'ctrl' undeclared (first use in this function)
  if (ctrl->subsys->cmic & (1 << 3))
      ^
/tmp/kernel-kleber-57dc2e6-NQe1/build/drivers/nvme/host/nvme.h:502:6: note:
each undeclared identifier is reported only once for each function it appears in

[Fix]
The culprit is this patch:

commit 993f70b886c0062fb5ec7c3c556d074bb3380b9d
Author: Christoph Hellwig <hch@lst.de>
Date: Tue Nov 20 16:57:54 2018 +0100

    nvme: warn when finding multi-port subsystems without multipathing enabled

    BugLink: https://bugs.launchpad.net/bugs/1837161

    [ Upstream commit 14a1336e6fff47dd1028b484d6c802105c58e2ee ]
[...]
This patch was probably wrongly backported for bug #1837161 from linux-4.19.y
stable and not needed since bionic/linux lacks commit 0d0b660f214d (nvme: add
ANA support) which introduced nvme_mpath_init(). The fix is to revert this patch.

[Test Case]

Disabled kernel config CONFIG_NVM and compile the kernel.

[Regression Potential]

Low. The patch was wrongly backported and can be safely reverted.

Kleber Sacilotto de Souza (1):
  Revert "nvme: warn when finding multi-port subsystems without
    multipathing enabled"

 drivers/nvme/host/nvme.h | 3 ---
 1 file changed, 3 deletions(-)

Comments

Andrea Righi July 31, 2019, 4:30 p.m. UTC | #1
On Wed, Jul 31, 2019 at 06:28:09PM +0200, Kleber Sacilotto de Souza wrote:
> [Impact]
> 
> When compiling bionic linux 4.15.0-56.62 with CONFIG_NVM disabled, it fails with:
> 
> make[5]: *** [drivers/nvme/host/core.o] Error 1
> make[5]: *** Waiting for unfinished jobs....
> In file included from /tmp/kernel-kleber-57dc2e6-NQe1/build/drivers/nvme/host/multipath.c:15:0:
> /tmp/kernel-kleber-57dc2e6-NQe1/build/drivers/nvme/host/nvme.h: In function
> 'nvme_nvm_register_sysfs':
> /tmp/kernel-kleber-57dc2e6-NQe1/build/drivers/nvme/host/nvme.h:502:6: error:
> 'ctrl' undeclared (first use in this function)
>   if (ctrl->subsys->cmic & (1 << 3))
>       ^
> /tmp/kernel-kleber-57dc2e6-NQe1/build/drivers/nvme/host/nvme.h:502:6: note:
> each undeclared identifier is reported only once for each function it appears in
> 
> [Fix]
> The culprit is this patch:
> 
> commit 993f70b886c0062fb5ec7c3c556d074bb3380b9d
> Author: Christoph Hellwig <hch@lst.de>
> Date: Tue Nov 20 16:57:54 2018 +0100
> 
>     nvme: warn when finding multi-port subsystems without multipathing enabled
> 
>     BugLink: https://bugs.launchpad.net/bugs/1837161
> 
>     [ Upstream commit 14a1336e6fff47dd1028b484d6c802105c58e2ee ]
> [...]
> --- a/drivers/nvme/host/nvme.h
> +++ b/drivers/nvme/host/nvme.h
> @@ -499,6 +499,9 @@ static inline int nvme_nvm_register(struct nvme_ns *ns, char *disk_name,
>  static inline void nvme_nvm_unregister(struct nvme_ns *ns) {};
>  static inline int nvme_nvm_register_sysfs(struct nvme_ns *ns)
>  {
> + if (ctrl->subsys->cmic & (1 << 3))
> + dev_warn(ctrl->device,
> +"Please enable CONFIG_NVME_MULTIPATH for full support of multi-port devices.\n");
>         return 0;
>  }
> 
> which is adding the new lines to a different function than the original upstream
> commit:
> 
> --- a/drivers/nvme/host/nvme.h
> +++ b/drivers/nvme/host/nvme.h
> @@ -531,6 +531,9 @@ static inline void nvme_mpath_check_last_path(struct nvme_ns *ns)
>  static inline int nvme_mpath_init(struct nvme_ctrl *ctrl,
>                 struct nvme_id_ctrl *id)
>  {
> + if (ctrl->subsys->cmic & (1 << 3))
> + dev_warn(ctrl->device,
> +"Please enable CONFIG_NVME_MULTIPATH for full support of multi-port devices.\n");
>         return 0;
>  }
> 
> This patch was probably wrongly backported for bug #1837161 from linux-4.19.y
> stable and not needed since bionic/linux lacks commit 0d0b660f214d (nvme: add
> ANA support) which introduced nvme_mpath_init(). The fix is to revert this patch.
> 
> [Test Case]
> 
> Disabled kernel config CONFIG_NVM and compile the kernel.
> 
> [Regression Potential]
> 
> Low. The patch was wrongly backported and can be safely reverted.
> 
> Kleber Sacilotto de Souza (1):
>   Revert "nvme: warn when finding multi-port subsystems without
>     multipathing enabled"
> 
>  drivers/nvme/host/nvme.h | 3 ---
>  1 file changed, 3 deletions(-)
> 
> -- 
> 2.17.1

Acked-by: Andrea Righi <andrea.righi@canonical.com>
Kamal Mostafa July 31, 2019, 4:30 p.m. UTC | #2
Certainly an invalid backport.  Thanks for reverting it.

Acked-by: Kamal Mostafa <kamal@canonical.com>

 -Kamal


On Wed, Jul 31, 2019 at 06:28:09PM +0200, Kleber Sacilotto de Souza wrote:
> [Impact]
> 
> When compiling bionic linux 4.15.0-56.62 with CONFIG_NVM disabled, it fails with:
> 
> make[5]: *** [drivers/nvme/host/core.o] Error 1
> make[5]: *** Waiting for unfinished jobs....
> In file included from /tmp/kernel-kleber-57dc2e6-NQe1/build/drivers/nvme/host/multipath.c:15:0:
> /tmp/kernel-kleber-57dc2e6-NQe1/build/drivers/nvme/host/nvme.h: In function
> 'nvme_nvm_register_sysfs':
> /tmp/kernel-kleber-57dc2e6-NQe1/build/drivers/nvme/host/nvme.h:502:6: error:
> 'ctrl' undeclared (first use in this function)
>   if (ctrl->subsys->cmic & (1 << 3))
>       ^
> /tmp/kernel-kleber-57dc2e6-NQe1/build/drivers/nvme/host/nvme.h:502:6: note:
> each undeclared identifier is reported only once for each function it appears in
> 
> [Fix]
> The culprit is this patch:
> 
> commit 993f70b886c0062fb5ec7c3c556d074bb3380b9d
> Author: Christoph Hellwig <hch@lst.de>
> Date: Tue Nov 20 16:57:54 2018 +0100
> 
>     nvme: warn when finding multi-port subsystems without multipathing enabled
> 
>     BugLink: https://bugs.launchpad.net/bugs/1837161
> 
>     [ Upstream commit 14a1336e6fff47dd1028b484d6c802105c58e2ee ]
> [...]
> --- a/drivers/nvme/host/nvme.h
> +++ b/drivers/nvme/host/nvme.h
> @@ -499,6 +499,9 @@ static inline int nvme_nvm_register(struct nvme_ns *ns, char *disk_name,
>  static inline void nvme_nvm_unregister(struct nvme_ns *ns) {};
>  static inline int nvme_nvm_register_sysfs(struct nvme_ns *ns)
>  {
> + if (ctrl->subsys->cmic & (1 << 3))
> + dev_warn(ctrl->device,
> +"Please enable CONFIG_NVME_MULTIPATH for full support of multi-port devices.\n");
>         return 0;
>  }
> 
> which is adding the new lines to a different function than the original upstream
> commit:
> 
> --- a/drivers/nvme/host/nvme.h
> +++ b/drivers/nvme/host/nvme.h
> @@ -531,6 +531,9 @@ static inline void nvme_mpath_check_last_path(struct nvme_ns *ns)
>  static inline int nvme_mpath_init(struct nvme_ctrl *ctrl,
>                 struct nvme_id_ctrl *id)
>  {
> + if (ctrl->subsys->cmic & (1 << 3))
> + dev_warn(ctrl->device,
> +"Please enable CONFIG_NVME_MULTIPATH for full support of multi-port devices.\n");
>         return 0;
>  }
> 
> This patch was probably wrongly backported for bug #1837161 from linux-4.19.y
> stable and not needed since bionic/linux lacks commit 0d0b660f214d (nvme: add
> ANA support) which introduced nvme_mpath_init(). The fix is to revert this patch.
> 
> [Test Case]
> 
> Disabled kernel config CONFIG_NVM and compile the kernel.
> 
> [Regression Potential]
> 
> Low. The patch was wrongly backported and can be safely reverted.
> 
> Kleber Sacilotto de Souza (1):
>   Revert "nvme: warn when finding multi-port subsystems without
>     multipathing enabled"
> 
>  drivers/nvme/host/nvme.h | 3 ---
>  1 file changed, 3 deletions(-)
> 
> -- 
> 2.17.1
> 
> 
> -- 
> kernel-team mailing list
> kernel-team@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team
Khalid Elmously Aug. 1, 2019, 4:47 a.m. UTC | #3
Applied after adding the missing "BugLink: "

The bug is marked for linux-azure too - that's a mistake?




On 2019-07-31 18:28:09 , Kleber Souza wrote:
> [Impact]
> 
> When compiling bionic linux 4.15.0-56.62 with CONFIG_NVM disabled, it fails with:
> 
> make[5]: *** [drivers/nvme/host/core.o] Error 1
> make[5]: *** Waiting for unfinished jobs....
> In file included from /tmp/kernel-kleber-57dc2e6-NQe1/build/drivers/nvme/host/multipath.c:15:0:
> /tmp/kernel-kleber-57dc2e6-NQe1/build/drivers/nvme/host/nvme.h: In function
> 'nvme_nvm_register_sysfs':
> /tmp/kernel-kleber-57dc2e6-NQe1/build/drivers/nvme/host/nvme.h:502:6: error:
> 'ctrl' undeclared (first use in this function)
>   if (ctrl->subsys->cmic & (1 << 3))
>       ^
> /tmp/kernel-kleber-57dc2e6-NQe1/build/drivers/nvme/host/nvme.h:502:6: note:
> each undeclared identifier is reported only once for each function it appears in
> 
> [Fix]
> The culprit is this patch:
> 
> commit 993f70b886c0062fb5ec7c3c556d074bb3380b9d
> Author: Christoph Hellwig <hch@lst.de>
> Date: Tue Nov 20 16:57:54 2018 +0100
> 
>     nvme: warn when finding multi-port subsystems without multipathing enabled
> 
>     BugLink: https://bugs.launchpad.net/bugs/1837161
> 
>     [ Upstream commit 14a1336e6fff47dd1028b484d6c802105c58e2ee ]
> [...]
> --- a/drivers/nvme/host/nvme.h
> +++ b/drivers/nvme/host/nvme.h
> @@ -499,6 +499,9 @@ static inline int nvme_nvm_register(struct nvme_ns *ns, char *disk_name,
>  static inline void nvme_nvm_unregister(struct nvme_ns *ns) {};
>  static inline int nvme_nvm_register_sysfs(struct nvme_ns *ns)
>  {
> + if (ctrl->subsys->cmic & (1 << 3))
> + dev_warn(ctrl->device,
> +"Please enable CONFIG_NVME_MULTIPATH for full support of multi-port devices.\n");
>         return 0;
>  }
> 
> which is adding the new lines to a different function than the original upstream
> commit:
> 
> --- a/drivers/nvme/host/nvme.h
> +++ b/drivers/nvme/host/nvme.h
> @@ -531,6 +531,9 @@ static inline void nvme_mpath_check_last_path(struct nvme_ns *ns)
>  static inline int nvme_mpath_init(struct nvme_ctrl *ctrl,
>                 struct nvme_id_ctrl *id)
>  {
> + if (ctrl->subsys->cmic & (1 << 3))
> + dev_warn(ctrl->device,
> +"Please enable CONFIG_NVME_MULTIPATH for full support of multi-port devices.\n");
>         return 0;
>  }
> 
> This patch was probably wrongly backported for bug #1837161 from linux-4.19.y
> stable and not needed since bionic/linux lacks commit 0d0b660f214d (nvme: add
> ANA support) which introduced nvme_mpath_init(). The fix is to revert this patch.
> 
> [Test Case]
> 
> Disabled kernel config CONFIG_NVM and compile the kernel.
> 
> [Regression Potential]
> 
> Low. The patch was wrongly backported and can be safely reverted.
> 
> Kleber Sacilotto de Souza (1):
>   Revert "nvme: warn when finding multi-port subsystems without
>     multipathing enabled"
> 
>  drivers/nvme/host/nvme.h | 3 ---
>  1 file changed, 3 deletions(-)
> 
> -- 
> 2.17.1
> 
> 
> -- 
> kernel-team mailing list
> kernel-team@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team
Kleber Sacilotto de Souza Aug. 1, 2019, 7:12 a.m. UTC | #4
On 01.08.19 06:47, Khaled Elmously wrote:
> Applied after adding the missing "BugLink: "
> 
> The bug is marked for linux-azure too - that's a mistake?

That was intended. I spotted the build failure with xenial/linux-azure,
the build is successful with bionic/linux because CONFIG_NVM is enabled
there. So I have applied the patch to xenial/linux-azure to be able
to build it for this cycle without the need for a re-spin.

> 
> 
> 
> 
> On 2019-07-31 18:28:09 , Kleber Souza wrote:
>> [Impact]
>>
>> When compiling bionic linux 4.15.0-56.62 with CONFIG_NVM disabled, it fails with:
>>
>> make[5]: *** [drivers/nvme/host/core.o] Error 1
>> make[5]: *** Waiting for unfinished jobs....
>> In file included from /tmp/kernel-kleber-57dc2e6-NQe1/build/drivers/nvme/host/multipath.c:15:0:
>> /tmp/kernel-kleber-57dc2e6-NQe1/build/drivers/nvme/host/nvme.h: In function
>> 'nvme_nvm_register_sysfs':
>> /tmp/kernel-kleber-57dc2e6-NQe1/build/drivers/nvme/host/nvme.h:502:6: error:
>> 'ctrl' undeclared (first use in this function)
>>   if (ctrl->subsys->cmic & (1 << 3))
>>       ^
>> /tmp/kernel-kleber-57dc2e6-NQe1/build/drivers/nvme/host/nvme.h:502:6: note:
>> each undeclared identifier is reported only once for each function it appears in
>>
>> [Fix]
>> The culprit is this patch:
>>
>> commit 993f70b886c0062fb5ec7c3c556d074bb3380b9d
>> Author: Christoph Hellwig <hch@lst.de>
>> Date: Tue Nov 20 16:57:54 2018 +0100
>>
>>     nvme: warn when finding multi-port subsystems without multipathing enabled
>>
>>     BugLink: https://bugs.launchpad.net/bugs/1837161
>>
>>     [ Upstream commit 14a1336e6fff47dd1028b484d6c802105c58e2ee ]
>> [...]
>> --- a/drivers/nvme/host/nvme.h
>> +++ b/drivers/nvme/host/nvme.h
>> @@ -499,6 +499,9 @@ static inline int nvme_nvm_register(struct nvme_ns *ns, char *disk_name,
>>  static inline void nvme_nvm_unregister(struct nvme_ns *ns) {};
>>  static inline int nvme_nvm_register_sysfs(struct nvme_ns *ns)
>>  {
>> + if (ctrl->subsys->cmic & (1 << 3))
>> + dev_warn(ctrl->device,
>> +"Please enable CONFIG_NVME_MULTIPATH for full support of multi-port devices.\n");
>>         return 0;
>>  }
>>
>> which is adding the new lines to a different function than the original upstream
>> commit:
>>
>> --- a/drivers/nvme/host/nvme.h
>> +++ b/drivers/nvme/host/nvme.h
>> @@ -531,6 +531,9 @@ static inline void nvme_mpath_check_last_path(struct nvme_ns *ns)
>>  static inline int nvme_mpath_init(struct nvme_ctrl *ctrl,
>>                 struct nvme_id_ctrl *id)
>>  {
>> + if (ctrl->subsys->cmic & (1 << 3))
>> + dev_warn(ctrl->device,
>> +"Please enable CONFIG_NVME_MULTIPATH for full support of multi-port devices.\n");
>>         return 0;
>>  }
>>
>> This patch was probably wrongly backported for bug #1837161 from linux-4.19.y
>> stable and not needed since bionic/linux lacks commit 0d0b660f214d (nvme: add
>> ANA support) which introduced nvme_mpath_init(). The fix is to revert this patch.
>>
>> [Test Case]
>>
>> Disabled kernel config CONFIG_NVM and compile the kernel.
>>
>> [Regression Potential]
>>
>> Low. The patch was wrongly backported and can be safely reverted.
>>
>> Kleber Sacilotto de Souza (1):
>>   Revert "nvme: warn when finding multi-port subsystems without
>>     multipathing enabled"
>>
>>  drivers/nvme/host/nvme.h | 3 ---
>>  1 file changed, 3 deletions(-)
>>
>> -- 
>> 2.17.1
>>
>>
>> -- 
>> kernel-team mailing list
>> kernel-team@lists.ubuntu.com
>> https://lists.ubuntu.com/mailman/listinfo/kernel-team
diff mbox

Patch

--- a/drivers/nvme/host/nvme.h
+++ b/drivers/nvme/host/nvme.h
@@ -499,6 +499,9 @@  static inline int nvme_nvm_register(struct nvme_ns *ns, char *disk_name,
 static inline void nvme_nvm_unregister(struct nvme_ns *ns) {};
 static inline int nvme_nvm_register_sysfs(struct nvme_ns *ns)
 {
+ if (ctrl->subsys->cmic & (1 << 3))
+ dev_warn(ctrl->device,
+"Please enable CONFIG_NVME_MULTIPATH for full support of multi-port devices.\n");
        return 0;
 }

which is adding the new lines to a different function than the original upstream
commit:

--- a/drivers/nvme/host/nvme.h
+++ b/drivers/nvme/host/nvme.h
@@ -531,6 +531,9 @@  static inline void nvme_mpath_check_last_path(struct nvme_ns *ns)
 static inline int nvme_mpath_init(struct nvme_ctrl *ctrl,
                struct nvme_id_ctrl *id)
 {
+ if (ctrl->subsys->cmic & (1 << 3))
+ dev_warn(ctrl->device,
+"Please enable CONFIG_NVME_MULTIPATH for full support of multi-port devices.\n");
        return 0;
 }