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
the timeout value. The problem is that if commands were started at
00:00:05 and 00:00:10 and the timeout value was 15 seconds and the
first command completed ok, then conn_rsp_timer_fn would have run
at 00:00:20 and rescheduled the next conn_rsp_timer_fn run for 15
secs from that time (00:00:35). But, we would have wanted to check on
the second command at 15 secs after its write_start time which is
00:00:25.
This patch has us reschedule the next conn_rsp_timer_fn run for
the req's write_start time + its timeout.
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5093 d57e44dd-8a1f-0410-8b47-8ef2f437770f
1. If we have a nop in flight then we do not really need to send
more to test if the other side is still there. Either that nop
will timeout and conn will be dropped or it will complete
and last_rcv_time will be updated.
2. We are sending nop-ins every nop_in_interval seconds, but if
we got a data half way in to the window, then when conn_nop_in_delayed_work_fn
is run it was scheduling the next check to be nop_in_interval more
seconds. With the current settings this could end up with us waiting
59 secs before sending a nop and about 130 secs for it to timeout, when
at 61 it should be timing out and getting cleaned up already. This patch
has us take into account when the last time we got data to try and
reschedule the next nop check closer to nop_in_interval from that time.
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5092 d57e44dd-8a1f-0410-8b47-8ef2f437770f
when a command/data is in the process of being sent. The snd
buffer space goes to zero and sendpage returns -EAGAIN. We then
wait for space to open. If space never opens then the cmd rsp timer
fires and the session/connection is dropped.
During that time we could try to send a nop as a ping, but it
is stuck behind that other command that got EAGAIN and we are
waiting for space to open to send them. We would expect the
nop in timer to fire before the cmd rsp timer, but it cannot
becuase the nop is sitting in the internal iscsi-scst queue.
This patch just has us start the timer ont he nop in right
away.
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5091 d57e44dd-8a1f-0410-8b47-8ef2f437770f