May be not completed, because this kernel has too many internal issues
reported after enabling "Kernel hacking" config options
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5163 d57e44dd-8a1f-0410-8b47-8ef2f437770f
The following procfs-related changes have been included in kernel 3.10:
- The PDE() macro has been removed from <linux/proc_fs.h>.
- The create_proc_entry() function has been removed.
- The proc_info field has been removed from struct scsi_host_template.
Unbreak the procfs build for kernel versions >= 3.10
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5148 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Apparently RHEL 5.9 has an implementation of set_cpus_allowed_ptr()
but RHEL 5.10 not. Work around this by providing an implementation.
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5147 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Avoid that compilation fails on RHEL 5.9. In the RHEL 5.9 kernel headers
neither __printf() nor sg_is_last() has been defined. Additionally, the
variable 'fd' in vdisk_unmap_range() is only defined when building against
kernel version > 2.6.27.
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5146 d57e44dd-8a1f-0410-8b47-8ef2f437770f
By default data receive error it should be assumed that no data
received, not that all data received as it is currently
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5138 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Make it possible to build an SCST RPM via the command "make rpm".
The contents of the two RPMs built by this command is as follows:
$ rpm -qlp rpmbuilddir/RPMS/x86_64/scst-3.11.8+-3.0.0.*-1.x86_64.rpm
/lib/modules/3.11.8+/extra
/lib/modules/3.11.8+/extra/dev_handlers
/lib/modules/3.11.8+/extra/dev_handlers/scst_cdrom.ko
/lib/modules/3.11.8+/extra/dev_handlers/scst_changer.ko
/lib/modules/3.11.8+/extra/dev_handlers/scst_disk.ko
/lib/modules/3.11.8+/extra/dev_handlers/scst_modisk.ko
/lib/modules/3.11.8+/extra/dev_handlers/scst_processor.ko
/lib/modules/3.11.8+/extra/dev_handlers/scst_raid.ko
/lib/modules/3.11.8+/extra/dev_handlers/scst_tape.ko
/lib/modules/3.11.8+/extra/dev_handlers/scst_user.ko
/lib/modules/3.11.8+/extra/dev_handlers/scst_vdisk.ko
/lib/modules/3.11.8+/extra/fcst.ko
/lib/modules/3.11.8+/extra/ib_srpt.ko
/lib/modules/3.11.8+/extra/iscsi-scst.ko
/lib/modules/3.11.8+/extra/qla2x00tgt.ko
/lib/modules/3.11.8+/extra/qla2xxx_scst.ko
/lib/modules/3.11.8+/extra/scst.ko
/lib/modules/3.11.8+/extra/scst_local.ko
/usr/sbin/iscsi-scst-adm
/usr/sbin/iscsi-scstd
/usr/share/man/man5/iscsi-scstd.conf.5.gz
/usr/share/man/man8/iscsi-scst-adm.8.gz
/usr/share/man/man8/iscsi-scstd.8.gz
/var/lib/scst
$ rpm -qlp rpmbuilddir/RPMS/x86_64/scst-3.11.8+-devel-3.0.0.*-1.x86_64.rpm
/usr/include/scst
/usr/include/scst/Module.symvers
/usr/include/scst/scst.h
/usr/include/scst/scst_const.h
/usr/include/scst/scst_debug.h
/usr/include/scst/scst_sgv.h
/usr/include/scst/scst_user.h
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5137 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Some users think these instructions are not valid for Linux 3.x kernels
since there are examples in this document referring to a 2.6.x kernel.
Hence update the examples.
Explain how to discover initiator port WWNs since this is nontrivial for
novice users.
Update the SourceForge SVN SCST URL since it changed a few months ago.
Move the qla2xxx module unload step to after the system reboot. Performing
that step after the reboot even though that module has already been
blacklisted is necessary because at that time initrd has not yet been
rebuilt and hence a reboot can cause that module to be reloaded from initrd.
The steps for building and installing SCST itself have been reduced from
four commands into a single command.
The sample scst.conf file is now generated - local FC port WWNs are
discovered automatically.
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5135 d57e44dd-8a1f-0410-8b47-8ef2f437770f
A quote from SBC-3 about WRITE SAME (10): "If the number of
logical blocks specified to be unmapped or written exceeds the value
indicated in the MAXIMUM WRITE SAME LENGTH field in the Block Limits
VPD page (see 6.6.3), then the device server shall terminate the command
with CHECK CONDITION status with the sense key set to ILLEGAL REQUEST
and the additional sense code set to INVALID FIELD IN CDB."
This patch fixes the following crash since with the current implementation
data_len >= 2**63 makes (unsigned)ws_sg_cnt >= 2**31 and this causes
sg_init_table() to crash as follows:
BUG: unable to handle kernel paging request at 00000027ffffffe8
IP: [<ffffffff8120d51e>] sg_init_table+0x5e/0x90
CPU: 1 PID: 10297 Comm: disk014_1 Tainted: G O 3.11.0-debug+ #1
RIP: 0010:[<ffffffff8120d51e>] [<ffffffff8120d51e>] sg_init_table+0x5e/0x90
Call Trace:
[<ffffffffa02e4b46>] scst_write_same+0x236/0x340 [scst]
[<ffffffffa034db30>] ? vdisk_exec_write_same_unmap.isra.35+0x170/0x170 [scst_vdisk]
[<ffffffffa034dba4>] vdisk_exec_write_same+0x74/0x170 [scst_vdisk]
[<ffffffffa034824e>] vdev_do_job+0x15e/0x390 [scst_vdisk]
[<ffffffffa03484a5>] vdisk_exec+0x25/0x70 [scst_vdisk]
[<ffffffffa02cafb5>] scst_do_real_exec+0xa5/0x3d0 [scst]
[<ffffffffa02ce2da>] scst_exec_check_blocking+0xea/0x310 [scst]
[<ffffffffa02ce695>] scst_exec_check_sn+0x195/0x2f0 [scst]
[<ffffffffa02cff31>] scst_process_active_cmd+0x521/0x750 [scst]
[<ffffffffa02d01e1>] scst_do_job_active+0x81/0x1a0 [scst]
[<ffffffffa02d0537>] scst_cmd_thread+0x157/0x340 [scst]
[<ffffffff81069ea6>] kthread+0xd6/0xe0
[<ffffffff814debfc>] ret_from_fork+0x7c/0xb0
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5122 d57e44dd-8a1f-0410-8b47-8ef2f437770f
I think the comments in scst.h for data_direction and expected_data_direction
can be made more clear. The patch below makes the comments for these two
variables more detailed.
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5121 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Avoid that sparse complains about a local symbol not having been declared
static (scst_pool_dep_map and scst_conn_dep_map). Also avoid that sparse
reports these two variables as unused in the procfs build.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5110 d57e44dd-8a1f-0410-8b47-8ef2f437770f