1. Commands start going to the init_cmd_list probably because SCST was suspended
2. A command is now waiting in the init_cmd_list, it was not yet completely initialized (more impotently cmd->dev == NULL)
3. A clear task set for the same lun arrives from a different initiator
4. The command is marked as aborted from other initiator and released from the init list.
5. The command gets to the PRE_XMIT_RESPONSE state, since it was aborted the scst_xmit_process_aborted_cmd is called.
6. At this stage since the command is marked as aborted by other initiator the scst checks for the device TAS flag (cmd->dev->tas) however cmd->dev is NULL and we crash on Null pointer de-referencing.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1466 d57e44dd-8a1f-0410-8b47-8ef2f437770f
or EXTRACHECKS_WARN_ON_ONCE() macros trigger a compiler warning about an
empty controlled statement in a release or perf build.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1458 d57e44dd-8a1f-0410-8b47-8ef2f437770f
is built via the kbuild infastructure. In kernel version 2.6.24 (commit
f77bf01425b11947eeb3b5b54685212c302741b8) the kbuild variable ccflags-y has
been introduced and the use of EXTRA_CFLAGS in kbuild makefiles has been
deprecated. The patch below converts SCST's in-tree makefiles such that these
use ccflags-y instead of EXTRA_CFLAGS when generating kernel patches for
kernel 2.6.24 or later.
Additionally, this patch removes the "default n" from the file
scst/kernel/in-tree/Kconfig.scst since this statement is superfluous.
The patch below has been tested by verifying the output of the following
command:
for ((v=23;v<=32;v++)); do rm -rf re* && scripts/run-regression-tests 2.6.$v; done
Signed-off-by: Bart Van Assche <bart.vanassche@gmail.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1447 d57e44dd-8a1f-0410-8b47-8ef2f437770f
completion queue processing is not aborted but that the remaining
completion queue entries are processed.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1446 d57e44dd-8a1f-0410-8b47-8ef2f437770f
- With thread=1, the kernel thread was stopped before all I/O was stopped.
This could result in IB completions for responses sent to the initiator
not being processed, scst_tgt_cmd_done() not being called for certain
SCST commands and hence this race could cause "rmmod ib_srpt" to hang.
- ib_unregister_event_handler() was called after cancel_work_sync(). This
could cause srpt_event_handler() to queue new work, work that could be
executed after the data it operates on had been deallocated.
Change: simplified module unloading by calling ib_destroy_cm_id(sdev->cm_id)
before calling scst_unregister(). This made the variable "cleaning_up"
superfluous.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1441 d57e44dd-8a1f-0410-8b47-8ef2f437770f
- srpt_release_channel_by_cmid(): the sdev->spinlock and scst_mgmt_lock are
no longer locked nested.
- srpt_find_channel(): does now return NULL when the channel is not found
(which never happens).
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1432 d57e44dd-8a1f-0410-8b47-8ef2f437770f
iSCSI-SCST: A huge improvements in errors recovery and iSCSI RFC complaince as well as performance. Also:
- Fixes and improvements for MaxOutstandingR2T>1
- Flow control tracing added.
- Cleanups
SCST core:
- Now for scst_cmd_init_stage1_done() commands preprocessing_done() is always called before xmit_response(), even in case of abort or error.
- Fixed recently introduced bug, which can lead to sending responses for aborted commands after reply on the corresponding TM command already sent.
- Flow control tracing added.
- Now it is possible to call functions setting commands execution status (e.g., scst_set_cmd_error_status()) several times for the same command. Only the first call will be completed, other calls - ignored.
- All commands are counted and shown in proc/sysfs now. Before only active, i.e. not yet executed commands, were counted and shown there.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1431 d57e44dd-8a1f-0410-8b47-8ef2f437770f
- Removed references to SCST core internal state names.
- Does no longer accept new connections while unloading.
- Module unloading should now really no longer cause a hang.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1429 d57e44dd-8a1f-0410-8b47-8ef2f437770f
- Decreased number of target-to-initiator request send buffers from two
to one such that a clear error message can be printed when the SRP
initiator did not respond to the SRP_CRED_REQ information unit.
- Bug fix: don't modify ch->last_response_req_lim when sending an SRP
information unit that contains the REQUEST LIMIT DELTA field failed.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1424 d57e44dd-8a1f-0410-8b47-8ef2f437770f
- Bug fix: don't set the REQUEST LIMIT DELTA field to SRPT_RQ_SIZE when
sending the first reponse to the initiator but to the proper value
(a small integer).
- An SRP_CRED_REQ information unit is now sent to the initiator if the
number of I/O contexts available for receiving dropped below two I/O
contexts (see also the SRP standard for more information). This change
is required to fix the SRP initiator lockup that happens when the
initiator sends requests faster than the target can process them. In
order to fix the lockup, it is also necessary to implement SRP_CRED_REQ
support in the SRP initiator in the vanilla Linux kernel and in OFED.
Neither kernel version 2.6.32 nor OFED 1.5 nor any previous
version of these components supports SRP_CRED_REQ information units.
See also http://bugzilla.kernel.org/show_bug.cgi?id=14235 for more
information about the initiator lockup.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1423 d57e44dd-8a1f-0410-8b47-8ef2f437770f
document:
* For some Linux distro's the command iscsi-iname is installed in /usr/sbin
and for others in /sbin.
* The scst and scst_vdisk modules must be loaded before the sample scstadmin
commands work.
Signed-off-by: Bart Van Assche <bart.vanassche@gmail.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1421 d57e44dd-8a1f-0410-8b47-8ef2f437770f
function scst_sysfs_cleanup() is declared as an exit-only function while it is
also called from init_scst(). The patch below fixes this section mismatch.
This patch has been tested by verifying that the following command does not
report any section mismatches:
make CONFIG_DEBUG_SECTION_MISMATCH=y scst iscsi-scst srpt
Signed-off-by: Bart Van Assche <bart.vanassche@gmail.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1420 d57e44dd-8a1f-0410-8b47-8ef2f437770f
- Convert sense data to/from fixed format / descriptor format before
sending back a response.
- Print an error message to the kernel log when an unsupported IB event
has been received.
- Return the SCSI status BUSY instead of CHECK CONDITION when allocating
an SCST command failed (until r1409, the SCSI status in the SRP_RSP
information unit was set to TASK SET FULL in this case).
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1419 d57e44dd-8a1f-0410-8b47-8ef2f437770f