* Re: [PATCH] git scsi misc include fix [not found] <20071014053508.30836.69658.sendpatchset@jackhammer.engr.sgi.com> @ 2007-10-15 23:35 ` James Bottomley 2007-10-15 23:55 ` Andrew Morton 2007-10-16 0:08 ` Paul Jackson 0 siblings, 2 replies; 5+ messages in thread From: James Bottomley @ 2007-10-15 23:35 UTC (permalink / raw) To: Paul Jackson Cc: Andrew Morton, Matthew Wilcox, linux-kernel, Andrew Vasquez, linux-scsi On Sat, 2007-10-13 at 22:35 -0700, Paul Jackson wrote: > From: Paul Jackson <pj@sgi.com> > > The added line in scsi_eh.h: > struct scatterlist sense_sgl; > fails to compile, with the error: > field 'sense_sgl' has incomplete type > unless scatterlist.h happens to be included > somehow already ... which it isn't always. > > So include scatterlist.h in scsi_eh.h directly. > > Signed-off-by: Paul Jackson <pj@sgi.com> > > --- > > This patch goes after the patch 'git-scsi-misc.patch' > > include/scsi/scsi_eh.h | 1 + > 1 file changed, 1 insertion(+) > > --- 2.6.23-mm1.orig/include/scsi/scsi_eh.h 2007-10-13 01:13:26.568876534 -0700 > +++ 2.6.23-mm1/include/scsi/scsi_eh.h 2007-10-13 01:31:32.911855338 -0700 > @@ -2,6 +2,7 @@ > #define _SCSI_SCSI_EH_H > > #include <scsi/scsi_cmnd.h> > +#include <linux/scatterlist.h> > struct scsi_device; > struct Scsi_Host; I've added linux-scsi which should be cc'd on all SCSI issues. I don't quite believe this, though. The requirement for struct scatterlist is the same before and after the gid scsi-misc patch. If the compile fails with git-scsi-misc because of a missing scatterlist include, it should also fail with vanilla 2.6.23 without the git patch ... could you see if you can find out why it doesn't? thanks, James ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] git scsi misc include fix 2007-10-15 23:35 ` [PATCH] git scsi misc include fix James Bottomley @ 2007-10-15 23:55 ` Andrew Morton 2007-10-16 0:08 ` Paul Jackson 1 sibling, 0 replies; 5+ messages in thread From: Andrew Morton @ 2007-10-15 23:55 UTC (permalink / raw) To: James Bottomley; +Cc: pj, willy, linux-kernel, andrew.vasquez, linux-scsi On Mon, 15 Oct 2007 19:35:30 -0400 James Bottomley <James.Bottomley@SteelEye.com> wrote: > On Sat, 2007-10-13 at 22:35 -0700, Paul Jackson wrote: > > From: Paul Jackson <pj@sgi.com> > > > > The added line in scsi_eh.h: > > struct scatterlist sense_sgl; > > fails to compile, with the error: > > field 'sense_sgl' has incomplete type > > unless scatterlist.h happens to be included > > somehow already ... which it isn't always. > > > > So include scatterlist.h in scsi_eh.h directly. > > > > Signed-off-by: Paul Jackson <pj@sgi.com> > > > > --- > > > > This patch goes after the patch 'git-scsi-misc.patch' > > > > include/scsi/scsi_eh.h | 1 + > > 1 file changed, 1 insertion(+) > > > > --- 2.6.23-mm1.orig/include/scsi/scsi_eh.h 2007-10-13 01:13:26.568876534 -0700 > > +++ 2.6.23-mm1/include/scsi/scsi_eh.h 2007-10-13 01:31:32.911855338 -0700 > > @@ -2,6 +2,7 @@ > > #define _SCSI_SCSI_EH_H > > > > #include <scsi/scsi_cmnd.h> > > +#include <linux/scatterlist.h> > > struct scsi_device; > > struct Scsi_Host; > > > I've added linux-scsi which should be cc'd on all SCSI issues. > > I don't quite believe this, though. The requirement for struct > scatterlist is the same before and after the gid scsi-misc patch. If > the compile fails with git-scsi-misc because of a missing scatterlist > include, it should also fail with vanilla 2.6.23 without the git > patch ... could you see if you can find out why it doesn't? > git-scsi-misc adds this: struct scsi_eh_save { int result; enum dma_data_direction data_direction; unsigned char cmd_len; unsigned char cmnd[MAX_COMMAND_SIZE]; void *buffer; unsigned bufflen; unsigned short use_sg; int resid; struct scatterlist sense_sgl; }; which will not compile unless the includer has earlier included scatterlist.h. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] git scsi misc include fix 2007-10-15 23:35 ` [PATCH] git scsi misc include fix James Bottomley 2007-10-15 23:55 ` Andrew Morton @ 2007-10-16 0:08 ` Paul Jackson 2007-10-16 1:07 ` James Bottomley 1 sibling, 1 reply; 5+ messages in thread From: Paul Jackson @ 2007-10-16 0:08 UTC (permalink / raw) To: James Bottomley; +Cc: akpm, willy, linux-kernel, andrew.vasquez, linux-scsi James wrote: > The requirement for struct scatterlist is the same > before and after the gid scsi-misc patch. Not so. The git-scsi-misc.patch in 2.6.23-mm1 clearly adds the line: struct scatterlist sense_sgl; as part of the added struct scsi_eh_save in scsi/scsi_eh.h. This bit me while I was doing a bisection on 2.6.23-mm1, for another problem, in git-sched, which is discussed in the lkml thread: git-sched patch won't boot on SN arch, 2.6.23-mm1 This is using sn2_defconfig. The full 2.6.23-mm1 patch set builds ok, because another patch, git-block.patch as I recall, includes scatterlist.h some other way, but for the following range of patches in 2.6.23-mm1, on the configuration sn2_defconfig, the build is broken, due to 'struct scatterlist' being an incomplete type: git-scsi-misc.patch git-scsi-misc-include-fix.patch git-scsi-misc-fixup.patch qla2xxx-printk-fixes.patch pci-error-recovery-symbios-scsi-base-support.patch pci-error-recovery-symbios-scsi-first-failure.patch nsp32_restart_autoscsi-remove-error-check.patch scsi-send-media-state-change-modification-events.patch scsi-early-detection-of-medium-not-present-updated.patch mptbase-reset-ioc-initiator-during-pci-resume.patch scsi-use-notifier-chain-for-asynchronous-event.patch initio-fix-conflict-when-loading-driver.patch git-block.patch > it should also fail with vanilla 2.6.23 I don't know about the vanilla 2.6.23 case. -- I won't rest till it's the best ... Programmer, Linux Scalability Paul Jackson <pj@sgi.com> 1.925.600.0401 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] git scsi misc include fix 2007-10-16 0:08 ` Paul Jackson @ 2007-10-16 1:07 ` James Bottomley 2007-10-16 1:24 ` Paul Jackson 0 siblings, 1 reply; 5+ messages in thread From: James Bottomley @ 2007-10-16 1:07 UTC (permalink / raw) To: Paul Jackson Cc: akpm, willy, linux-kernel, andrew.vasquez, linux-scsi, Boaz Harrosh On Mon, 2007-10-15 at 17:08 -0700, Paul Jackson wrote: > James wrote: > > The requirement for struct scatterlist is the same > > before and after the gid scsi-misc patch. > > Not so. The git-scsi-misc.patch in 2.6.23-mm1 clearly adds the line: > > struct scatterlist sense_sgl; > > as part of the added struct scsi_eh_save in scsi/scsi_eh.h. > > This bit me while I was doing a bisection on 2.6.23-mm1, for another > problem, in git-sched, which is discussed in the lkml thread: > > git-sched patch won't boot on SN arch, 2.6.23-mm1 > > This is using sn2_defconfig. The full 2.6.23-mm1 patch set builds ok, > because another patch, git-block.patch as I recall, includes > scatterlist.h some other way, but for the following range of patches in > 2.6.23-mm1, on the configuration sn2_defconfig, the build is broken, > due to 'struct scatterlist' being an incomplete type: > > git-scsi-misc.patch > git-scsi-misc-include-fix.patch > git-scsi-misc-fixup.patch > qla2xxx-printk-fixes.patch > pci-error-recovery-symbios-scsi-base-support.patch > pci-error-recovery-symbios-scsi-first-failure.patch > nsp32_restart_autoscsi-remove-error-check.patch > scsi-send-media-state-change-modification-events.patch > scsi-early-detection-of-medium-not-present-updated.patch > mptbase-reset-ioc-initiator-during-pci-resume.patch > scsi-use-notifier-chain-for-asynchronous-event.patch > initio-fix-conflict-when-loading-driver.patch > git-block.patch > > > it should also fail with vanilla 2.6.23 > > I don't know about the vanilla 2.6.23 case. Ah, right, sorry ... on the ball now. I thought you were saying that the scsi_error.c compilation was failing. In that case, the correct fix is actually to move the scatterlist include from scsi_error.c (where the scatterlist was originally used locally) into scsi_eh.h, like this. James diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index d29f846..ebaca4c 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c @@ -24,7 +24,6 @@ #include <linux/interrupt.h> #include <linux/blkdev.h> #include <linux/delay.h> -#include <linux/scatterlist.h> #include <scsi/scsi.h> #include <scsi/scsi_cmnd.h> diff --git a/include/scsi/scsi_eh.h b/include/scsi/scsi_eh.h index 44224ba..d21b891 100644 --- a/include/scsi/scsi_eh.h +++ b/include/scsi/scsi_eh.h @@ -1,6 +1,8 @@ #ifndef _SCSI_SCSI_EH_H #define _SCSI_SCSI_EH_H +#include <linux/scatterlist.h> + #include <scsi/scsi_cmnd.h> struct scsi_device; struct Scsi_Host; ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] git scsi misc include fix 2007-10-16 1:07 ` James Bottomley @ 2007-10-16 1:24 ` Paul Jackson 0 siblings, 0 replies; 5+ messages in thread From: Paul Jackson @ 2007-10-16 1:24 UTC (permalink / raw) To: James Bottomley Cc: akpm, willy, linux-kernel, andrew.vasquez, linux-scsi, bharrosh James wrote: > In that case, the correct fix > is actually to move the scatterlist include from scsi_error.c (where the > scatterlist was originally used locally) into scsi_eh.h, like this. I suspect you're correct, yes. -- I won't rest till it's the best ... Programmer, Linux Scalability Paul Jackson <pj@sgi.com> 1.925.600.0401 ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-10-16 1:24 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20071014053508.30836.69658.sendpatchset@jackhammer.engr.sgi.com>
2007-10-15 23:35 ` [PATCH] git scsi misc include fix James Bottomley
2007-10-15 23:55 ` Andrew Morton
2007-10-16 0:08 ` Paul Jackson
2007-10-16 1:07 ` James Bottomley
2007-10-16 1:24 ` Paul Jackson
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox