- Modified srpt_build_cmd_rsp() and srpt_build_tskmgmt_rsp() such that
these two functions now return the number of bytes of the response PDU
built.
- Converted a printk() statement to TRACE_DBG().
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1029 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Since SCST r979 the SRP target source code does no longer compile on RHEL /
CentOS systems where OFED has been installed. This is because OFED has its
own backported versions of the 2.6.20+ workqueue API and already includes a
definition of cancel_delayed_work_sync(). The patch below makes sure that on
RHEL 5 / CentOS 5 systems with OFED 1.4 installed the SCST definition of
cancel_delayed_work_sync() does not conflict with the OFED definition of
the same function.
The patch below has been tested by verifying that the SRPT source code
compiles and runs fine on CentOS 5.3 + OFED 1.4.1 and also on a system with
a vanilla 2.6.30.4 kernel.
Signed-off-by: Bart Van Assche <bart.vanassche@gmail.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1023 d57e44dd-8a1f-0410-8b47-8ef2f437770f
this list. Only the number of IB devices is relevant for the SRPT
implementation. Introduced a new counter that tracks the number of IB
devices.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1016 d57e44dd-8a1f-0410-8b47-8ef2f437770f
srpt_ch_qp_rtr() and srpt_ch_qp_rts().
- Replaced dynamic memory allocation (kmalloc()/kfree()) in the aforementioned
two functions by stack allocation.
- Compiles again on pre-2.6.22 kernels (RHEL / CentOS systems).
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1015 d57e44dd-8a1f-0410-8b47-8ef2f437770f
- Inlined srpt_disconnect_channel().
- Modified error handling coding style in srpt_cm_req_recv() to the usual
kernel coding style: upon error, jump to the error handling code.
- Added more comments.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1014 d57e44dd-8a1f-0410-8b47-8ef2f437770f
the SCST core fails (abort task, LUN reset, ...), an SRP_RSP PDU is
now sent back to the initiator.
- Added more debug tracing statements.
- Improved readability of some parts of the source code.
- Added more comments.
- Partially reverted one hunk of r1003: while casting an unsigned 64-bit
value to the type u64 and printing such values via %llx works fine on
x86 systems, the same code triggers a compiler warning on PowerPC
systems. So while r1003 changed some (unsigned long long) casts to (u64)
casts, this revision changes these back to (unsigned long long) casts.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1012 d57e44dd-8a1f-0410-8b47-8ef2f437770f
The following fixes were made:
- Use monotonic clock as time source instead of a real-time clock so change of system time will not affect calculation.
- Init scst_time to 0 + minor display fix.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1007 d57e44dd-8a1f-0410-8b47-8ef2f437770f
- Added a second argument to srpt_find_channel() that specified whether or not
the channel should be removed from the channel list if found.
- Moved list_del() statement from the body of the srpt_release_channel()
function to its callers.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1005 d57e44dd-8a1f-0410-8b47-8ef2f437770f
- Changed return type of srpt_release_channel() from int to void
because the return value did depend in a trivial way on the function
arguments. Changed the return type of srpt_find_and_release_channel()
and several of its callers also from int to void. Instead
srpt_cm_handler() now directly sets its own return value.
- Converted a list_for_each_entry_safe() into a list_for_each_entry() loop
because no elements are added or deleted in the loop body.
- Converted debug-printk() statements into TRACE_DBG().
- Changed indentation of one statement from 12 to 16 (was not reported by
checkpatch).
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1003 d57e44dd-8a1f-0410-8b47-8ef2f437770f
written into a buffer with a size of 32 bytes. Enlarged the buffer
to 36 bytes.
- Converted sprintf() calls to snprintf() calls.
- Added more TRACE_ENTRY() / TRACE_EXIT() statements.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@992 d57e44dd-8a1f-0410-8b47-8ef2f437770f
/proc/scsi_tgt/ib_srpt/trace_level such that the behavior of the
ib_srpt target is consistent with that of other SCST drivers.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@991 d57e44dd-8a1f-0410-8b47-8ef2f437770f
wait until srpt_refresh_port_work() finished. This race condition could be
triggered during module removal.
- Added a kernel module parameter called "trace_flag" that allows to set the
trace flags for the ib_srpt module before module initialization starts.
- Added sysfs variable /sys/class/infiniband_srpt/trace_level that allows to
display and to modify the enabled trace flags in a human-readable form.
- Added several TRACE_ENTRY() / TRACE_EXIT() statements.
- Added more comments.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@988 d57e44dd-8a1f-0410-8b47-8ef2f437770f
- Fileio_tgt updated to be able to use those neww facilities
- Docs updated. Particulary, a new dociment describing the SGV cache added
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@986 d57e44dd-8a1f-0410-8b47-8ef2f437770f
I suggest the attached patch for the issue of disabling target mode
while I/O.
Fix BUG in qla target. Set ha->tgt to NULL in wrong place (when
disabling target mode). This cause to unfinished commands, and the echo
command to disabling the target mode to stuck. scst_tgt_cmd_done never
called because the ha->tgt was set to NULL before it should be. ha->tgt
already set to NULL in q2t_target_release after all task managements
finished and all commands were cleaned, so the fix just remove the set
from q2t_host_action.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@984 d57e44dd-8a1f-0410-8b47-8ef2f437770f
now report functions that are called with a lock held but that are missing
__acquires() and __releases() annotations. The patch below adds such
annotations and makes the following sparse warnings disappear:
drivers/scst/iscsi-scst/iscsi.c:2861:9: warning: context imbalance in 'iscsi_check_send_delayed_tm_resp' - unexpected unlock
drivers/scst/iscsi-scst/nthread.c:1614:17: warning: context imbalance in 'scst_do_job_wr' - unexpected unlock
drivers/scst/iscsi-scst/iscsi.c:2861:9: warning: context imbalance in 'iscsi_check_send_delayed_tm_resp' - unexpected unlock
drivers/scst/iscsi-scst/nthread.c:1614:17: warning: context imbalance in 'scst_do_job_wr' - unexpected unlock
drivers/scst/scst_local/scst_local.c:554:30: warning: context imbalance in 'scst_local_queuecommand' - unexpected unlock
The patch below has been tested by comparing the output of
"scripts/run-regression-tests 2.6.30.3" before and after the patch was applied.
Signed-off-by: Bart Van Assche <bart.vanassche@gmail.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@982 d57e44dd-8a1f-0410-8b47-8ef2f437770f