[build fix] Re: [GIT PATCH] SCSI part 1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* James Bottomley <James.Bottomley@xxxxxxxxxxxxxxxxxxxxx> wrote:

>       zfcp: Move status accessors from zfcp to SCSI include file.

-tip testing found that the upstream build broke in fs/compat_ioctl.c:

----------->
In file included from include/scsi/scsi.h:12,
                 from fs/compat_ioctl.c:72:
include/scsi/scsi_cmnd.h:27:25: warning: "BLK_MAX_CDB" is not defined
include/scsi/scsi_cmnd.h:28:3: error: #error MAX_COMMAND_SIZE can not be bigger than BLK_MAX_CDB
In file included from include/scsi/scsi.h:12,
                 from fs/compat_ioctl.c:72:
include/scsi/scsi_cmnd.h: In function ‘scsi_bidi_cmnd’:
include/scsi/scsi_cmnd.h:182: error: implicit declaration of function ‘blk_bidi_rq’
include/scsi/scsi_cmnd.h:183: error: dereferencing pointer to incomplete type
include/scsi/scsi_cmnd.h: In function ‘scsi_in’:
include/scsi/scsi_cmnd.h:189: error: dereferencing pointer to incomplete type
<-----------

with this config:

  http://redhat.com/~mingo/misc/config-Wed_Jul_16_11_32_32_CEST_2008.bad

I have bisected it down to:

| feac6a07c4a3578bffd6769bb4927e8a7e1f3ffe is first bad commit
| commit feac6a07c4a3578bffd6769bb4927e8a7e1f3ffe
| Author: Martin Petermann <martin@xxxxxxxxxxxxxxxxxx>
| Date:   Wed Jul 2 10:56:35 2008 +0200
|
|    [SCSI] zfcp: Move status accessors from zfcp to SCSI include file.
|
|    Move the accessor functions for the scsi_cmnd status from zfcp to the
|    SCSI include file. Change the interface to the functions to pass the
|    scsi_cmnd pointer instead of the status pointer.
|
|    Signed-off-by: Martin Petermann <martin@xxxxxxxxxxxxxxxxxx>
|    Signed-off-by: Christof Schmitt <christof.schmitt@xxxxxxxxxx>
|    Signed-off-by: James Bottomley <James.Bottomley@xxxxxxxxxxxxxxxxxxxxx>

It was not possible to do a clean revert of that change because other 
zfcp changes were layered upon it.

The problem is this aspect of that change:

| @@ -9,6 +9,7 @@
|  #define _SCSI_SCSI_H
|
|  #include <linux/types.h>
| +#include <scsi/scsi_cmnd.h>
|
|  /*
|   * The maximum number of SG segments that we will put inside a

scsi_cmnd.h depends on symbols defined in blkdev.h. The fix is to 
include blkdev.h as well.

The commit below (in tip/out-of-tree) fixes this bug.

	Ingo

-------------->
commit 878dfa069329bb302449272ad020ae6f449f693e
Author: Ingo Molnar <mingo@xxxxxxx>
Date:   Wed Jul 16 11:56:08 2008 +0200

    scsi: fix build error in fs/compat_ioctl.c
    
    -tip testing found that the build broke in fs/compat_ioctl.c:
    
    ----------->
    In file included from include/scsi/scsi.h:12,
                     from fs/compat_ioctl.c:72:
    include/scsi/scsi_cmnd.h:27:25: warning: "BLK_MAX_CDB" is not defined
    include/scsi/scsi_cmnd.h:28:3: error: #error MAX_COMMAND_SIZE can not be bigger than BLK_MAX_CDB
    In file included from include/scsi/scsi.h:12,
                     from fs/compat_ioctl.c:72:
    include/scsi/scsi_cmnd.h: In function ‘scsi_bidi_cmnd’:
    include/scsi/scsi_cmnd.h:182: error: implicit declaration of function ‘blk_bidi_rq’
    include/scsi/scsi_cmnd.h:183: error: dereferencing pointer to incomplete type
    include/scsi/scsi_cmnd.h: In function ‘scsi_in’:
    include/scsi/scsi_cmnd.h:189: error: dereferencing pointer to incomplete type
    <-----------
    
    with this config:
    
      http://redhat.com/~mingo/misc/config-Wed_Jul_16_11_32_32_CEST_2008.bad
    
    I have bisected it down to:
    
    | feac6a07c4a3578bffd6769bb4927e8a7e1f3ffe is first bad commit
    | commit feac6a07c4a3578bffd6769bb4927e8a7e1f3ffe
    | Author: Martin Petermann <martin@xxxxxxxxxxxxxxxxxx>
    | Date:   Wed Jul 2 10:56:35 2008 +0200
    |
    |    [SCSI] zfcp: Move status accessors from zfcp to SCSI include file.
    |
    |    Move the accessor functions for the scsi_cmnd status from zfcp to the
    |    SCSI include file. Change the interface to the functions to pass the
    |    scsi_cmnd pointer instead of the status pointer.
    |
    |    Signed-off-by: Martin Petermann <martin@xxxxxxxxxxxxxxxxxx>
    |    Signed-off-by: Christof Schmitt <christof.schmitt@xxxxxxxxxx>
    |    Signed-off-by: James Bottomley <James.Bottomley@xxxxxxxxxxxxxxxxxxxxx>
    
    The problem is due to this aspect of that change:
    
    | @@ -9,6 +9,7 @@
    |  #define _SCSI_SCSI_H
    |
    |  #include <linux/types.h>
    | +#include <scsi/scsi_cmnd.h>
    |
    |  /*
    |   * The maximum number of SG segments that we will put inside a
    
    scsi_cmnd.h depends on symbols defined in blkdev.h. The fix is to
    include blkdev.h as well.
    
    Signed-off-by: Ingo Molnar <mingo@xxxxxxx>
---
 include/scsi/scsi.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h
index 00137a7..2ef4a91 100644
--- a/include/scsi/scsi.h
+++ b/include/scsi/scsi.h
@@ -9,6 +9,7 @@
 #define _SCSI_SCSI_H
 
 #include <linux/types.h>
+#include <linux/blkdev.h>
 #include <scsi/scsi_cmnd.h>
 
 /*
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux