2015-06-03 08:16:20

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: build failure after merge of the target-updates tree

Hi Nicholas,

After merging the target-updates tree, today's linux-next build (x86_64
allmodconfig) failed like this:

drivers/target/target_core_fabric_lib.c: In function 'target_get_pr_transport_id_len':
drivers/target/target_core_fabric_lib.c:364:7: error: 'SCSI_PROTOCOL_FCP' undeclared (first use in this function)
case SCSI_PROTOCOL_FCP:
^
drivers/target/target_core_fabric_lib.c:364:7: note: each undeclared identifier is reported only once for each function it appears in
drivers/target/target_core_fabric_lib.c:365:7: error: 'SCSI_PROTOCOL_SBP' undeclared (first use in this function)
case SCSI_PROTOCOL_SBP:
^
drivers/target/target_core_fabric_lib.c:366:7: error: 'SCSI_PROTOCOL_SRP' undeclared (first use in this function)
case SCSI_PROTOCOL_SRP:
^
drivers/target/target_core_fabric_lib.c:367:7: error: 'SCSI_PROTOCOL_SAS' undeclared (first use in this function)
case SCSI_PROTOCOL_SAS:
^
drivers/target/target_core_fabric_lib.c:369:7: error: 'SCSI_PROTOCOL_ISCSI' undeclared (first use in this function)
case SCSI_PROTOCOL_ISCSI:
^
drivers/target/target_core_fabric_lib.c: In function 'target_get_pr_transport_id':
drivers/target/target_core_fabric_lib.c:388:7: error: 'SCSI_PROTOCOL_SAS' undeclared (first use in this function)
case SCSI_PROTOCOL_SAS:
^
drivers/target/target_core_fabric_lib.c:390:7: error: 'SCSI_PROTOCOL_SBP' undeclared (first use in this function)
case SCSI_PROTOCOL_SBP:
^
drivers/target/target_core_fabric_lib.c:392:7: error: 'SCSI_PROTOCOL_SRP' undeclared (first use in this function)
case SCSI_PROTOCOL_SRP:
^
drivers/target/target_core_fabric_lib.c:394:7: error: 'SCSI_PROTOCOL_FCP' undeclared (first use in this function)
case SCSI_PROTOCOL_FCP:
^
drivers/target/target_core_fabric_lib.c:396:7: error: 'SCSI_PROTOCOL_ISCSI' undeclared (first use in this function)
case SCSI_PROTOCOL_ISCSI:
^
drivers/target/target_core_fabric_lib.c: In function 'target_parse_pr_out_transport_id':
drivers/target/target_core_fabric_lib.c:411:7: error: 'SCSI_PROTOCOL_SAS' undeclared (first use in this function)
case SCSI_PROTOCOL_SAS:
^
drivers/target/target_core_fabric_lib.c:418:7: error: 'SCSI_PROTOCOL_SBP' undeclared (first use in this function)
case SCSI_PROTOCOL_SBP:
^
drivers/target/target_core_fabric_lib.c:419:7: error: 'SCSI_PROTOCOL_SRP' undeclared (first use in this function)
case SCSI_PROTOCOL_SRP:
^
drivers/target/target_core_fabric_lib.c:420:7: error: 'SCSI_PROTOCOL_FCP' undeclared (first use in this function)
case SCSI_PROTOCOL_FCP:
^
drivers/target/target_core_fabric_lib.c:423:7: error: 'SCSI_PROTOCOL_ISCSI' undeclared (first use in this function)
case SCSI_PROTOCOL_ISCSI:
^

Caused by commit 2650d71e244f ("target: move transport ID handling to
the core") interacting with commit ba929992522b ("target: Minimize SCSI
header #include directives") from the scsi tree.

I have added this merge fix patch for today:

From: Stephen Rothwell <[email protected]>
Date: Wed, 3 Jun 2015 18:10:46 +1000
Subject: [PATCH] target: explicitly include scsi_proto.h in target_core_fabric_lib.c

Signed-off-by: Stephen Rothwell <[email protected]>
---
drivers/target/target_core_fabric_lib.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/target/target_core_fabric_lib.c b/drivers/target/target_core_fabric_lib.c
index b05578b5b4a0..cb6497ce4b61 100644
--- a/drivers/target/target_core_fabric_lib.c
+++ b/drivers/target/target_core_fabric_lib.c
@@ -35,6 +35,8 @@
#include <linux/spinlock.h>
#include <linux/export.h>

+#include <scsi/scsi_proto.h>
+
#include <target/target_core_base.h>
#include <target/target_core_fabric.h>

--
2.1.4

--
Cheers,
Stephen Rothwell [email protected]


Attachments:
(No filename) (819.00 B)
OpenPGP digital signature

2015-06-03 20:00:49

by James Bottomley

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the target-updates tree

On Wed, 2015-06-03 at 18:16 +1000, Stephen Rothwell wrote:
> Hi Nicholas,
>
> After merging the target-updates tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
>
> drivers/target/target_core_fabric_lib.c: In function 'target_get_pr_transport_id_len':
> drivers/target/target_core_fabric_lib.c:364:7: error: 'SCSI_PROTOCOL_FCP' undeclared (first use in this function)
> case SCSI_PROTOCOL_FCP:
> ^
> drivers/target/target_core_fabric_lib.c:364:7: note: each undeclared identifier is reported only once for each function it appears in
> drivers/target/target_core_fabric_lib.c:365:7: error: 'SCSI_PROTOCOL_SBP' undeclared (first use in this function)
> case SCSI_PROTOCOL_SBP:
> ^
> drivers/target/target_core_fabric_lib.c:366:7: error: 'SCSI_PROTOCOL_SRP' undeclared (first use in this function)
> case SCSI_PROTOCOL_SRP:
> ^
> drivers/target/target_core_fabric_lib.c:367:7: error: 'SCSI_PROTOCOL_SAS' undeclared (first use in this function)
> case SCSI_PROTOCOL_SAS:
> ^
> drivers/target/target_core_fabric_lib.c:369:7: error: 'SCSI_PROTOCOL_ISCSI' undeclared (first use in this function)
> case SCSI_PROTOCOL_ISCSI:
> ^
> drivers/target/target_core_fabric_lib.c: In function 'target_get_pr_transport_id':
> drivers/target/target_core_fabric_lib.c:388:7: error: 'SCSI_PROTOCOL_SAS' undeclared (first use in this function)
> case SCSI_PROTOCOL_SAS:
> ^
> drivers/target/target_core_fabric_lib.c:390:7: error: 'SCSI_PROTOCOL_SBP' undeclared (first use in this function)
> case SCSI_PROTOCOL_SBP:
> ^
> drivers/target/target_core_fabric_lib.c:392:7: error: 'SCSI_PROTOCOL_SRP' undeclared (first use in this function)
> case SCSI_PROTOCOL_SRP:
> ^
> drivers/target/target_core_fabric_lib.c:394:7: error: 'SCSI_PROTOCOL_FCP' undeclared (first use in this function)
> case SCSI_PROTOCOL_FCP:
> ^
> drivers/target/target_core_fabric_lib.c:396:7: error: 'SCSI_PROTOCOL_ISCSI' undeclared (first use in this function)
> case SCSI_PROTOCOL_ISCSI:
> ^
> drivers/target/target_core_fabric_lib.c: In function 'target_parse_pr_out_transport_id':
> drivers/target/target_core_fabric_lib.c:411:7: error: 'SCSI_PROTOCOL_SAS' undeclared (first use in this function)
> case SCSI_PROTOCOL_SAS:
> ^
> drivers/target/target_core_fabric_lib.c:418:7: error: 'SCSI_PROTOCOL_SBP' undeclared (first use in this function)
> case SCSI_PROTOCOL_SBP:
> ^
> drivers/target/target_core_fabric_lib.c:419:7: error: 'SCSI_PROTOCOL_SRP' undeclared (first use in this function)
> case SCSI_PROTOCOL_SRP:
> ^
> drivers/target/target_core_fabric_lib.c:420:7: error: 'SCSI_PROTOCOL_FCP' undeclared (first use in this function)
> case SCSI_PROTOCOL_FCP:
> ^
> drivers/target/target_core_fabric_lib.c:423:7: error: 'SCSI_PROTOCOL_ISCSI' undeclared (first use in this function)
> case SCSI_PROTOCOL_ISCSI:
> ^
>
> Caused by commit 2650d71e244f ("target: move transport ID handling to
> the core") interacting with commit ba929992522b ("target: Minimize SCSI
> header #include directives") from the scsi tree.
>
> I have added this merge fix patch for today:
>
> From: Stephen Rothwell <[email protected]>
> Date: Wed, 3 Jun 2015 18:10:46 +1000
> Subject: [PATCH] target: explicitly include scsi_proto.h in target_core_fabric_lib.c
>
> Signed-off-by: Stephen Rothwell <[email protected]>
> ---
> drivers/target/target_core_fabric_lib.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/target/target_core_fabric_lib.c b/drivers/target/target_core_fabric_lib.c
> index b05578b5b4a0..cb6497ce4b61 100644
> --- a/drivers/target/target_core_fabric_lib.c
> +++ b/drivers/target/target_core_fabric_lib.c
> @@ -35,6 +35,8 @@
> #include <linux/spinlock.h>
> #include <linux/export.h>
>
> +#include <scsi/scsi_proto.h>
> +
> #include <target/target_core_base.h>
> #include <target/target_core_fabric.h>

OK, this gives us a cross tree dependency on the SCSI header split
patches. Nic, if you base your tree off this commit in mine, I'll make
sure to push early in the merge window.

commit ba929992522b6d1f866b7021bc50da66f8fdd743
Author: Bart Van Assche <[email protected]>
Date: Fri May 8 10:11:12 2015 +0200

target: Minimize SCSI header #include directives

James


Attachments:
signature.asc (473.00 B)
This is a digitally signed message part

2015-06-03 22:13:18

by Nicholas A. Bellinger

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the target-updates tree

On Wed, 2015-06-03 at 13:00 -0700, James Bottomley wrote:
> On Wed, 2015-06-03 at 18:16 +1000, Stephen Rothwell wrote:
> > Hi Nicholas,
> >
> > After merging the target-updates tree, today's linux-next build (x86_64
> > allmodconfig) failed like this:
> >
> > drivers/target/target_core_fabric_lib.c: In function 'target_get_pr_transport_id_len':
> > drivers/target/target_core_fabric_lib.c:364:7: error: 'SCSI_PROTOCOL_FCP' undeclared (first use in this function)
> > case SCSI_PROTOCOL_FCP:
> > ^
> > drivers/target/target_core_fabric_lib.c:364:7: note: each undeclared identifier is reported only once for each function it appears in
> > drivers/target/target_core_fabric_lib.c:365:7: error: 'SCSI_PROTOCOL_SBP' undeclared (first use in this function)
> > case SCSI_PROTOCOL_SBP:
> > ^
> > drivers/target/target_core_fabric_lib.c:366:7: error: 'SCSI_PROTOCOL_SRP' undeclared (first use in this function)
> > case SCSI_PROTOCOL_SRP:
> > ^
> > drivers/target/target_core_fabric_lib.c:367:7: error: 'SCSI_PROTOCOL_SAS' undeclared (first use in this function)
> > case SCSI_PROTOCOL_SAS:
> > ^
> > drivers/target/target_core_fabric_lib.c:369:7: error: 'SCSI_PROTOCOL_ISCSI' undeclared (first use in this function)
> > case SCSI_PROTOCOL_ISCSI:
> > ^
> > drivers/target/target_core_fabric_lib.c: In function 'target_get_pr_transport_id':
> > drivers/target/target_core_fabric_lib.c:388:7: error: 'SCSI_PROTOCOL_SAS' undeclared (first use in this function)
> > case SCSI_PROTOCOL_SAS:
> > ^
> > drivers/target/target_core_fabric_lib.c:390:7: error: 'SCSI_PROTOCOL_SBP' undeclared (first use in this function)
> > case SCSI_PROTOCOL_SBP:
> > ^
> > drivers/target/target_core_fabric_lib.c:392:7: error: 'SCSI_PROTOCOL_SRP' undeclared (first use in this function)
> > case SCSI_PROTOCOL_SRP:
> > ^
> > drivers/target/target_core_fabric_lib.c:394:7: error: 'SCSI_PROTOCOL_FCP' undeclared (first use in this function)
> > case SCSI_PROTOCOL_FCP:
> > ^
> > drivers/target/target_core_fabric_lib.c:396:7: error: 'SCSI_PROTOCOL_ISCSI' undeclared (first use in this function)
> > case SCSI_PROTOCOL_ISCSI:
> > ^
> > drivers/target/target_core_fabric_lib.c: In function 'target_parse_pr_out_transport_id':
> > drivers/target/target_core_fabric_lib.c:411:7: error: 'SCSI_PROTOCOL_SAS' undeclared (first use in this function)
> > case SCSI_PROTOCOL_SAS:
> > ^
> > drivers/target/target_core_fabric_lib.c:418:7: error: 'SCSI_PROTOCOL_SBP' undeclared (first use in this function)
> > case SCSI_PROTOCOL_SBP:
> > ^
> > drivers/target/target_core_fabric_lib.c:419:7: error: 'SCSI_PROTOCOL_SRP' undeclared (first use in this function)
> > case SCSI_PROTOCOL_SRP:
> > ^
> > drivers/target/target_core_fabric_lib.c:420:7: error: 'SCSI_PROTOCOL_FCP' undeclared (first use in this function)
> > case SCSI_PROTOCOL_FCP:
> > ^
> > drivers/target/target_core_fabric_lib.c:423:7: error: 'SCSI_PROTOCOL_ISCSI' undeclared (first use in this function)
> > case SCSI_PROTOCOL_ISCSI:
> > ^
> >
> > Caused by commit 2650d71e244f ("target: move transport ID handling to
> > the core") interacting with commit ba929992522b ("target: Minimize SCSI
> > header #include directives") from the scsi tree.
> >
> > I have added this merge fix patch for today:
> >
> > From: Stephen Rothwell <[email protected]>
> > Date: Wed, 3 Jun 2015 18:10:46 +1000
> > Subject: [PATCH] target: explicitly include scsi_proto.h in target_core_fabric_lib.c
> >
> > Signed-off-by: Stephen Rothwell <[email protected]>
> > ---
> > drivers/target/target_core_fabric_lib.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/target/target_core_fabric_lib.c b/drivers/target/target_core_fabric_lib.c
> > index b05578b5b4a0..cb6497ce4b61 100644
> > --- a/drivers/target/target_core_fabric_lib.c
> > +++ b/drivers/target/target_core_fabric_lib.c
> > @@ -35,6 +35,8 @@
> > #include <linux/spinlock.h>
> > #include <linux/export.h>
> >
> > +#include <scsi/scsi_proto.h>
> > +
> > #include <target/target_core_base.h>
> > #include <target/target_core_fabric.h>
>
> OK, this gives us a cross tree dependency on the SCSI header split
> patches. Nic, if you base your tree off this commit in mine, I'll make
> sure to push early in the merge window.
>
> commit ba929992522b6d1f866b7021bc50da66f8fdd743
> Author: Bart Van Assche <[email protected]>
> Date: Fri May 8 10:11:12 2015 +0200
>
> target: Minimize SCSI header #include directives
>

Rebasing one subsystem's for-next atop another subsystem's for-next is a
sure fire way to cause Linus to become irate.

But it's not even necessary here anyways, just fold Stephen's patch to
add scsi_proto.h to target_core_fabric_configfs.c into the original
change, and be done with it.

--nab

2015-06-03 22:33:43

by James Bottomley

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the target-updates tree

On Wed, 2015-06-03 at 15:12 -0700, Nicholas A. Bellinger wrote:
> On Wed, 2015-06-03 at 13:00 -0700, James Bottomley wrote:
> > On Wed, 2015-06-03 at 18:16 +1000, Stephen Rothwell wrote:
> > > Hi Nicholas,
> > >
> > > After merging the target-updates tree, today's linux-next build (x86_64
> > > allmodconfig) failed like this:
> > >
> > > drivers/target/target_core_fabric_lib.c: In function 'target_get_pr_transport_id_len':
> > > drivers/target/target_core_fabric_lib.c:364:7: error: 'SCSI_PROTOCOL_FCP' undeclared (first use in this function)
> > > case SCSI_PROTOCOL_FCP:
> > > ^
> > > drivers/target/target_core_fabric_lib.c:364:7: note: each undeclared identifier is reported only once for each function it appears in
> > > drivers/target/target_core_fabric_lib.c:365:7: error: 'SCSI_PROTOCOL_SBP' undeclared (first use in this function)
> > > case SCSI_PROTOCOL_SBP:
> > > ^
> > > drivers/target/target_core_fabric_lib.c:366:7: error: 'SCSI_PROTOCOL_SRP' undeclared (first use in this function)
> > > case SCSI_PROTOCOL_SRP:
> > > ^
> > > drivers/target/target_core_fabric_lib.c:367:7: error: 'SCSI_PROTOCOL_SAS' undeclared (first use in this function)
> > > case SCSI_PROTOCOL_SAS:
> > > ^
> > > drivers/target/target_core_fabric_lib.c:369:7: error: 'SCSI_PROTOCOL_ISCSI' undeclared (first use in this function)
> > > case SCSI_PROTOCOL_ISCSI:
> > > ^
> > > drivers/target/target_core_fabric_lib.c: In function 'target_get_pr_transport_id':
> > > drivers/target/target_core_fabric_lib.c:388:7: error: 'SCSI_PROTOCOL_SAS' undeclared (first use in this function)
> > > case SCSI_PROTOCOL_SAS:
> > > ^
> > > drivers/target/target_core_fabric_lib.c:390:7: error: 'SCSI_PROTOCOL_SBP' undeclared (first use in this function)
> > > case SCSI_PROTOCOL_SBP:
> > > ^
> > > drivers/target/target_core_fabric_lib.c:392:7: error: 'SCSI_PROTOCOL_SRP' undeclared (first use in this function)
> > > case SCSI_PROTOCOL_SRP:
> > > ^
> > > drivers/target/target_core_fabric_lib.c:394:7: error: 'SCSI_PROTOCOL_FCP' undeclared (first use in this function)
> > > case SCSI_PROTOCOL_FCP:
> > > ^
> > > drivers/target/target_core_fabric_lib.c:396:7: error: 'SCSI_PROTOCOL_ISCSI' undeclared (first use in this function)
> > > case SCSI_PROTOCOL_ISCSI:
> > > ^
> > > drivers/target/target_core_fabric_lib.c: In function 'target_parse_pr_out_transport_id':
> > > drivers/target/target_core_fabric_lib.c:411:7: error: 'SCSI_PROTOCOL_SAS' undeclared (first use in this function)
> > > case SCSI_PROTOCOL_SAS:
> > > ^
> > > drivers/target/target_core_fabric_lib.c:418:7: error: 'SCSI_PROTOCOL_SBP' undeclared (first use in this function)
> > > case SCSI_PROTOCOL_SBP:
> > > ^
> > > drivers/target/target_core_fabric_lib.c:419:7: error: 'SCSI_PROTOCOL_SRP' undeclared (first use in this function)
> > > case SCSI_PROTOCOL_SRP:
> > > ^
> > > drivers/target/target_core_fabric_lib.c:420:7: error: 'SCSI_PROTOCOL_FCP' undeclared (first use in this function)
> > > case SCSI_PROTOCOL_FCP:
> > > ^
> > > drivers/target/target_core_fabric_lib.c:423:7: error: 'SCSI_PROTOCOL_ISCSI' undeclared (first use in this function)
> > > case SCSI_PROTOCOL_ISCSI:
> > > ^
> > >
> > > Caused by commit 2650d71e244f ("target: move transport ID handling to
> > > the core") interacting with commit ba929992522b ("target: Minimize SCSI
> > > header #include directives") from the scsi tree.
> > >
> > > I have added this merge fix patch for today:
> > >
> > > From: Stephen Rothwell <[email protected]>
> > > Date: Wed, 3 Jun 2015 18:10:46 +1000
> > > Subject: [PATCH] target: explicitly include scsi_proto.h in target_core_fabric_lib.c
> > >
> > > Signed-off-by: Stephen Rothwell <[email protected]>
> > > ---
> > > drivers/target/target_core_fabric_lib.c | 2 ++
> > > 1 file changed, 2 insertions(+)
> > >
> > > diff --git a/drivers/target/target_core_fabric_lib.c b/drivers/target/target_core_fabric_lib.c
> > > index b05578b5b4a0..cb6497ce4b61 100644
> > > --- a/drivers/target/target_core_fabric_lib.c
> > > +++ b/drivers/target/target_core_fabric_lib.c
> > > @@ -35,6 +35,8 @@
> > > #include <linux/spinlock.h>
> > > #include <linux/export.h>
> > >
> > > +#include <scsi/scsi_proto.h>
> > > +
> > > #include <target/target_core_base.h>
> > > #include <target/target_core_fabric.h>
> >
> > OK, this gives us a cross tree dependency on the SCSI header split
> > patches. Nic, if you base your tree off this commit in mine, I'll make
> > sure to push early in the merge window.
> >
> > commit ba929992522b6d1f866b7021bc50da66f8fdd743
> > Author: Bart Van Assche <[email protected]>
> > Date: Fri May 8 10:11:12 2015 +0200
> >
> > target: Minimize SCSI header #include directives
> >
>
> Rebasing one subsystem's for-next atop another subsystem's for-next is a
> sure fire way to cause Linus to become irate.

No, he's fine with it (as long as the trees aren't entangled when
submitted). We used to do it all the time with the block and SCSI trees;
it's why the scsi postmerge tree existed.

> But it's not even necessary here anyways, just fold Stephen's patch to
> add scsi_proto.h to target_core_fabric_configfs.c into the original
> change, and be done with it.

I can certainly do that, but other updates to the target tree could
cause this problem to reoccur in different files.

James

2015-06-03 22:46:12

by Nicholas A. Bellinger

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the target-updates tree

On Wed, 2015-06-03 at 15:33 -0700, James Bottomley wrote:
> On Wed, 2015-06-03 at 15:12 -0700, Nicholas A. Bellinger wrote:
> > On Wed, 2015-06-03 at 13:00 -0700, James Bottomley wrote:

<SNIP>

> > > OK, this gives us a cross tree dependency on the SCSI header split
> > > patches. Nic, if you base your tree off this commit in mine, I'll make
> > > sure to push early in the merge window.
> > >
> > > commit ba929992522b6d1f866b7021bc50da66f8fdd743
> > > Author: Bart Van Assche <[email protected]>
> > > Date: Fri May 8 10:11:12 2015 +0200
> > >
> > > target: Minimize SCSI header #include directives
> > >
> >
> > Rebasing one subsystem's for-next atop another subsystem's for-next is a
> > sure fire way to cause Linus to become irate.
>
> No, he's fine with it (as long as the trees aren't entangled when
> submitted). We used to do it all the time with the block and SCSI trees;
> it's why the scsi postmerge tree existed.
>

...

> > But it's not even necessary here anyways, just fold Stephen's patch to
> > add scsi_proto.h to target_core_fabric_configfs.c into the original
> > change, and be done with it.
>
> I can certainly do that, but other updates to the target tree could
> cause this problem to reoccur in different files.
>

target_core_fabric_lib.c is the only place where SCSI_PROTOCOL_* is used
and I don't expect this to change before -rc1, so it should be OK to
just fold into the original.