From: Mike C. <mi...@us...> - 2005-03-18 19:58:57
|
David Wysochanski wrote: > Mike Christie wrote: > >> N.C.Krishna Murthy (krmurthy) wrote: >> > The above patch sloves the compilation problem reported in the >> above sfnet >> > bug. Please review the same and let me know. >> > >> > P.S I do not have a 64 bit machine.I tested the patch with the cross >> > compilation option. >> > >> > >> > Thanx >> > NCKM >> >> I hit the same. do think that a linux include file is messed >> up instead though? do you normally have to include different files >> for different archs in the driver for ioctls? >> >> >> > Since we use "struct inode" explicitly, I believe the > correct thing to do is to include the header file where > this is exported in the iscsi-ioctl.c file where it is > used and not rely on getting lucky. This was already > suggested as a "workaround", but I believe this is the > right fix. In the past we had gotton the don't include file x becuase it is already included for you from file y. This is the reason why I wanted to make sure this was just not someone taking the time to research things like interrupt.h includes. > > The root of this problem is as follows. > On i386, the inclusion of include/scsi/scsi_cmnd.h on line 29 > of iscsi-sfnet.h leads to the inclusion of include/linux/fs.h, > while on x86_64, it does not (see below for header file inclusion > trees). The root of this seems to be that a difference in the > inclusions in include/asm/dma-mapping.h for the different > architectures, specifically, the i386 version includes > linux/mm.h and the x86_64 one does not. In short, we just got > lucky on i386. If you feel that it was luck on i386 then the patch is fine with me. The we use it so we must include is not always valid. > > Personally, I'm not in favor of doing some heroic effort to > figure out exactly why this is, and whether it's really correct > for the dma-mapping.h file on i386 to include mm.h while on > x86_64 it does not. If someone else objects, and thinks this > is very important, please let me know and I will dig deeper. > This is really a separate issue though. The compilation problem > is the result of not following good coding rules, so that should > be remedied by the inclusion of linux/fs.h. > > > i386 include file tree for iscsi-ioctl.c: > 10998:# 29 > "/root/rhel4-linux-iscsi/linux-iscsi-main-branch-03-18-2005/linux-iscsi/driver/include/iscsi-sfnet.h" > 2 > 10999:# 1 "include/scsi/scsi_cmnd.h" 1 > 11003:# 1 "include/linux/dma-mapping.h" 1 > 11008:# 1 "include/linux/err.h" 1 > 11009:# 16 "include/linux/err.h" > 11024:# 6 "include/linux/dma-mapping.h" 2 > 11038:# 1 "include/asm/dma-mapping.h" 1 > 11042:# 1 "include/linux/mm.h" 1 > 11043:# 14 "include/linux/mm.h" > 11044:# 1 "include/linux/prio_tree.h" 1 > 11077:# 56 "include/linux/prio_tree.h" > 11097:# 15 "include/linux/mm.h" 2 > 11098:# 1 "include/linux/fs.h" 1 > 11099:# 11 "include/linux/fs.h" > 11100:# 1 "include/linux/limits.h" 1 > 11101:# 12 "include/linux/fs.h" 2 > 11104:# 1 "include/linux/kdev_t.h" 1 > 11105:# 21 "include/linux/kdev_t.h" > 11174:# 15 "include/linux/fs.h" 2 > 11176:# 1 "include/linux/dcache.h" 1 > 11177:# 10 "include/linux/dcache.h" > 11178:# 1 "include/linux/rcupdate.h" 1 > 11179:# 50 "include/linux/rcupdate.h" > 11184:# 64 "include/linux/rcupdate.h" > 11277:# 241 "include/linux/rcupdate.h" > 11288:# 11 "include/linux/dcache.h" 2 > 11293:# 34 "include/linux/dcache.h" > 11381:# 161 "include/linux/dcache.h" > 11383:# 180 "include/linux/dcache.h" > 11436:# 242 "include/linux/dcache.h" > 11458:# 279 "include/linux/dcache.h" > 11469:# 297 "include/linux/dcache.h" > 11496:# 17 "include/linux/fs.h" 2 > 11510:# 50 "include/linux/fs.h" > 11526:# 221 "include/linux/fs.h" > 11527:# 1 "include/linux/radix-tree.h" 1 > 11528:# 25 "include/linux/radix-tree.h" > 11534:# 47 "include/linux/radix-tree.h" > 11558:# 222 "include/linux/fs.h" 2 > 11559:# 1 "include/linux/audit.h" 1 > 11560:# 106 "include/linux/audit.h" > 11613:# 171 "include/linux/audit.h" > 11639:# 223 "include/linux/fs.h" 2 > 11660:# 271 "include/linux/fs.h" > 11672:# 295 "include/linux/fs.h" > 11673:# 1 "include/linux/quota.h" 1 > 11674:# 45 "include/linux/quota.h" > 11679:# 106 "include/linux/quota.h" > 11691:# 127 "include/linux/quota.h" > 11701:# 1 "include/linux/dqblk_xfs.h" 1 > 11702:# 46 "include/linux/dqblk_xfs.h" > 11728:# 133 "include/linux/dqblk_xfs.h" > 11748:# 137 "include/linux/quota.h" 2 > 11749:# 1 "include/linux/dqblk_v1.h" 1 > 11750:# 15 "include/linux/dqblk_v1.h" > 11753:# 138 "include/linux/quota.h" 2 > 11754:# 1 "include/linux/dqblk_v2.h" 1 > 11755:# 14 "include/linux/dqblk_v2.h" > 11761:# 139 "include/linux/quota.h" 2 > 11762:# 147 "include/linux/quota.h" > 11817:# 210 "include/linux/quota.h" > 11903:# 304 "include/linux/quota.h" > 11911:# 296 "include/linux/fs.h" 2 > 11995:# 387 "include/linux/fs.h" > 12017:# 420 "include/linux/fs.h" > 12077:# 490 "include/linux/fs.h" > 12089:# 511 "include/linux/fs.h" > 12173:# 624 "include/linux/fs.h" > 12189:# 1 "include/linux/nfs_fs_i.h" 1 > 12195:# 1 "include/linux/nfs.h" 1 > 12196:# 10 "include/linux/nfs.h" > 12197:# 1 "include/linux/sunrpc/msg_prot.h" 1 > 12198:# 15 "include/linux/sunrpc/msg_prot.h" > 12256:# 11 "include/linux/nfs.h" 2 > 12257:# 42 "include/linux/nfs.h" > 12372:# 165 "include/linux/nfs.h" > 12378:# 7 "include/linux/nfs_fs_i.h" 2 > 12390:# 640 "include/linux/fs.h" 2 > 12414:# 671 "include/linux/fs.h" > 12417:# 1 "include/linux/fcntl.h" 1 > 12421:# 1 "include/asm/fcntl.h" 1 > 12422:# 71 "include/asm/fcntl.h" > 12438:# 5 "include/linux/fcntl.h" 2 > 12439:# 674 "include/linux/fs.h" 2 > 12490:# 733 "include/linux/fs.h" > 12585:# 847 "include/linux/fs.h" > 12604:# 875 "include/linux/fs.h" > 12710:# 992 "include/linux/fs.h" > 12735:# 1097 "include/linux/fs.h" > 12809:# 1179 "include/linux/fs.h" > 12812:# 1189 "include/linux/fs.h" > 12861:# 1252 "include/linux/fs.h" > 12912:# 1313 "include/linux/fs.h" > 13233:# 16 "include/linux/mm.h" 2 > 13254:# 1 "include/asm/pgtable.h" 1 > 13255:# 25 "include/asm/pgtable.h" > 13273:# 50 "include/asm/pgtable.h" > 13279:# 1 "include/asm/pgtable-3level-defs.h" 1 > 13280:# 56 "include/asm/pgtable.h" 2 > 13281:# 165 "include/asm/pgtable.h" > 13283:# 209 "include/asm/pgtable.h" > 13285:# 226 "include/asm/pgtable.h" > 13309:# 1 "include/asm/pgtable-3level.h" 1 > 13310:# 18 "include/asm/pgtable-3level.h" > 13350:# 71 "include/asm/pgtable-3level.h" > 13352:# 80 "include/asm/pgtable-3level.h" > 13402:# 250 "include/asm/pgtable.h" 2 > 13423:# 287 "include/asm/pgtable.h" > 13439:# 361 "include/asm/pgtable.h" > 13441:# 370 "include/asm/pgtable.h" > 13443:# 424 "include/asm/pgtable.h" > 13444:# 1 "include/asm-generic/pgtable.h" 1 > 13445:# 425 "include/asm/pgtable.h" 2 > 13446:# 37 "include/linux/mm.h" 2 > 13447:# 61 "include/linux/mm.h" > 13500:# 167 "include/linux/mm.h" > 13528:# 202 "include/linux/mm.h" > 13551:# 240 "include/linux/mm.h" > 13558:# 1 "include/linux/page-flags.h" 1 > 13559:# 83 "include/linux/page-flags.h" > 13617:# 301 "include/linux/page-flags.h" > 13634:# 247 "include/linux/mm.h" 2 > 13635:# 289 "include/linux/mm.h" > 13655:# 384 "include/linux/mm.h" > 13688:# 431 "include/linux/mm.h" > 13692:# 453 "include/linux/mm.h" > 13743:# 522 "include/linux/mm.h" > 13826:# 616 "include/linux/mm.h" > 14018:# 5 "include/asm/dma-mapping.h" 2 > 14021:# 1 "include/asm/io.h" 1 > 14022:# 48 "include/asm/io.h" > 14023:# 1 "include/asm-generic/iomap.h" 1 > 14024:# 27 "include/asm-generic/iomap.h" > 14032:# 46 "include/asm-generic/iomap.h" > 14049:# 49 "include/asm/io.h" 2 > 14051:# 1 "include/linux/vmalloc.h" 1 > 14052:# 12 "include/linux/vmalloc.h" > 14092:# 51 "include/asm/io.h" 2 > 14093:# 65 "include/asm/io.h" > 14098:# 83 "include/asm/io.h" > 14110:# 107 "include/asm/io.h" > 14126:# 146 "include/asm/io.h" > 14174:# 233 "include/asm/io.h" > 14190:# 263 "include/asm/io.h" > 14206:# 289 "include/asm/io.h" > 14211:# 317 "include/asm/io.h" > 14220:# 394 "include/asm/io.h" > 14224:# 8 "include/asm/dma-mapping.h" 2 > 14225:# 1 "include/asm/scatterlist.h" 1 > 14235:# 9 "include/asm/dma-mapping.h" 2 > 14403:# 20 "include/linux/dma-mapping.h" 2 > 14410:# 5 "include/scsi/scsi_cmnd.h" 2 > 14450:# 58 "include/scsi/scsi_cmnd.h" > 14537:# 159 "include/scsi/scsi_cmnd.h" > 14542:# 30 > "/root/rhel4-linux-iscsi/linux-iscsi-main-branch-03-18-2005/linux-iscsi/driver/include/iscsi-sfnet.h" > 2 > > > x86_64 include file tree for iscsi-ioctl.c > 10207:# 29 > "/root/linux-iscsi-4-0-branch-03-18-2005/linux-iscsi/driver/include/iscsi-sfnet.h" > 2 > 10208:# 1 "include/scsi/scsi_cmnd.h" 1 > 10212:# 1 "include/linux/dma-mapping.h" 1 > 10217:# 1 "include/linux/err.h" 1 > 10218:# 16 "include/linux/err.h" > 10233:# 6 "include/linux/dma-mapping.h" 2 > 10247:# 1 "include/asm/dma-mapping.h" 1 > 10248:# 11 "include/asm/dma-mapping.h" > 10249:# 1 "include/asm/scatterlist.h" 1 > 10260:# 12 "include/asm/dma-mapping.h" 2 > 10261:# 1 "include/asm/io.h" 1 > 10262:# 85 "include/asm/io.h" > 10288:# 1 "include/linux/vmalloc.h" 1 > 10289:# 12 "include/linux/vmalloc.h" > 10329:# 111 "include/asm/io.h" 2 > 10345:# 138 "include/asm/io.h" > 10360:# 218 "include/asm/io.h" > 10363:# 266 "include/asm/io.h" > 10379:# 297 "include/asm/io.h" > 10395:# 322 "include/asm/io.h" > 10397:# 13 "include/asm/dma-mapping.h" 2 > 10398:# 1 "include/asm/swiotlb.h" 1 > 10430:# 14 "include/asm/dma-mapping.h" 2 > 10447:# 62 "include/asm/dma-mapping.h" > 10523:# 20 "include/linux/dma-mapping.h" 2 > 10530:# 34 "include/linux/dma-mapping.h" > 10549:# 5 "include/scsi/scsi_cmnd.h" 2 > 10589:# 58 "include/scsi/scsi_cmnd.h" > 10676:# 159 "include/scsi/scsi_cmnd.h" > 10681:# 30 > "/root/linux-iscsi-4-0-branch-03-18-2005/linux-iscsi/driver/include/iscsi-sfnet.h" > 2 > > > > > >> ------------------------------------------------------- >> SF email is sponsored by - The IT Product Guide >> Read honest & candid reviews on hundreds of IT Products from real users. >> Discover which products truly live up to the hype. Start reading now. >> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click >> <http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click> >> _______________________________________________ >> linux-iscsi-devel mailing list >> lin...@li... >> https://lists.sourceforge.net/lists/listinfo/linux-iscsi-devel >> > > |