Commit Graph

948 Commits

Author SHA1 Message Date
Bart Van Assche
6dc8835e7e - Bug fix: if processing of any of the SRP task management functions by
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
2009-08-04 18:45:46 +00:00
Vladislav Bolkhovitin
b06a932d2c Web updates
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1011 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-08-04 17:50:43 +00:00
Vladislav Bolkhovitin
cef4a0ec28 A minor SAM violation fixed.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1010 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-08-04 17:17:16 +00:00
Vladislav Bolkhovitin
c722a2b159 Minor typo noticed by Bart Van Assche <bart.vanassche@gmail.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1009 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-08-04 16:59:09 +00:00
Vladislav Bolkhovitin
01c113dbb4 Patch from Smadar Gonen <smadar.gn@gmail.com>:
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
2009-08-04 11:59:15 +00:00
Vladislav Bolkhovitin
24f4743f68 Web updates
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1006 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-08-04 11:10:18 +00:00
Bart Van Assche
70110ec078 Fixed race conditions on RDMA channel manipulations found via source reading:
- 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
2009-08-03 16:00:36 +00:00
Bart Van Assche
7234de012f Multiple cosmetic source code changes.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1004 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-08-03 15:06:00 +00:00
Bart Van Assche
47d7742f4e - Enabled the LUN reset task management function.
- 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
2009-08-02 18:57:48 +00:00
Bart Van Assche
7cb9d95684 Added even more comments.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1002 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-08-02 18:45:40 +00:00
Bart Van Assche
4d249a4112 Added command-line option -f, which allows to skip the test whether there is still data present.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1001 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-08-02 18:04:21 +00:00
Bart Van Assche
c49f89cec1 Whitespace-only change: fixed a checkpatch complaint.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1000 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-08-01 06:50:36 +00:00
Bart Van Assche
7c25f55ad9 Only call scst_tgt_cmd_done() if scst_rx_data() has not been called.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@999 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-08-01 06:03:55 +00:00
Bart Van Assche
58eb630bd0 Fixed the issue that 'rmmod ib_srpt' with ongoing SRP I/O could trigger
a deadlock.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@998 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-07-31 11:40:10 +00:00
Bart Van Assche
f5097d6263 Whitespace-only changes: fixed checkpatch complaints introduced in the previous commit.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@997 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-07-31 11:33:26 +00:00
Bart Van Assche
221ce1846b Added more comments.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@996 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-07-31 11:27:54 +00:00
Vladislav Bolkhovitin
3fd8348c46 Patch from Smadar Gonen <smadar.gn@gmail.com> fixing some minor corner cases
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@994 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-07-31 10:52:40 +00:00
Bart Van Assche
ec9041654c Upgraded kernel versions 2.6.27.28 and 2.6.30.3 to 2.6.27.29 and 2.6.30.4 respectively.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@993 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-07-31 06:21:31 +00:00
Bart Van Assche
745a852fbe - Fixed a buffer overrun: a service entry name occupying 35 bytes was
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
2009-07-30 12:48:06 +00:00
Bart Van Assche
57f4019ed5 Moved /sys/class/infiniband_srpt/trace_level to
/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
2009-07-30 08:32:23 +00:00
Bart Van Assche
3bf7d6dca1 Compiles again with tracing disabled.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@990 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-07-30 06:38:15 +00:00
Bart Van Assche
3e18defd73 Should have been included in the previous commit (r988).
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@989 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-07-29 18:14:41 +00:00
Bart Van Assche
5d67fefe37 - Fixed a race condition found via source reading: srpt_remove_one() did not
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
2009-07-29 16:57:00 +00:00
Bart Van Assche
606ef2bea5 Whitespace-only changes: removed trailing whitespace because checkpatch complained about it.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@987 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-07-29 15:46:46 +00:00
Vladislav Bolkhovitin
d257a9541d - Possibility to operate with single size entries as well as control of the reclamation time added to the SGV caache
- 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
2009-07-29 12:49:17 +00:00
Vladislav Bolkhovitin
e2b8393690 Web updates
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@985 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-07-28 11:01:22 +00:00
Vladislav Bolkhovitin
aac4e05c23 Patch from Gal Rosen <galr@storwize.com>:
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
2009-07-28 09:29:12 +00:00
Bart Van Assche
833d111501 Whitespace-only change: fixed a recently introduced checkpatch error
about trailing whitespace.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@983 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-07-28 07:35:38 +00:00
Vladislav Bolkhovitin
7bdc38faf2 The most recent version of the sparse static source code checking tool does
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
2009-07-27 17:52:19 +00:00
Vladislav Bolkhovitin
eef2e46c90 Minor web fixes
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@981 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-07-27 17:49:19 +00:00
Vladislav Bolkhovitin
7cbd0df80d - Implemented abort on timeout of stuck in the firmware commands
- Minor cleanups



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@980 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-07-27 17:33:48 +00:00
Vladislav Bolkhovitin
eb144f2e6f - Implemented abort on timeout of stuck in tgt hardware commands
- Cleanups



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@979 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-07-27 16:59:49 +00:00
Vladislav Bolkhovitin
db5fbe625c Fix double free
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@977 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-07-27 16:19:10 +00:00
Vladislav Bolkhovitin
fa5fb3a3de WEB upates
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@976 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-07-27 11:39:05 +00:00
Bart Van Assche
b767ec183d Removed a trailing space because checkpatch complained about it.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@975 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-07-25 06:49:04 +00:00
Bart Van Assche
c1a86907e5 Updated kernel versions 2.6.27.27 to 2.6.27.28 and 2.6.30.2 to 2.6.30.3.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@974 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-07-25 06:45:35 +00:00
Vladislav Bolkhovitin
784044307a Fixes a race, which can lead to a hang, if a user space handler with >1 devices gets killed under load
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@972 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-07-24 17:38:40 +00:00
Dotan Barak
0a4165980d Various buglets- hopefully now fixed the case where 24XX fails to start.
Some stuff for multiple channels and internal f/w.




git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@971 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-07-23 15:37:47 +00:00
Vladislav Bolkhovitin
c811b44224 Some controllers seems to hang after receiving MODE SENSE(6) command. This patch adds sending MODE SENSE(10) instead, which can work better. But since this is remained untested, this code is disabled for now.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@970 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-07-22 10:12:09 +00:00
Bart Van Assche
791c79b18a Whitespace-only changes: fixed two recently introduced checkpatch errors (code should be indented by tabs / trailing whitespace).
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@969 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-07-22 06:31:30 +00:00
Vladislav Bolkhovitin
67d91f0ab5 Patch from Smadar Gonen <smadar.gn@gmail.com> with some modifications:
Minor fixes and cleanups



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@968 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-07-21 17:52:50 +00:00
Vladislav Bolkhovitin
3048e684a3 Patch from Smadar Gonen <smadar.gn@gmail.com>
Implements some useful scst_user statistic in /proc



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@967 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-07-21 17:47:05 +00:00
Bart Van Assche
6903b1d7ae Updated kernel versions 2.6.27.26 and 2.6.30.1 to 2.6.27.27 and 2.6.30.2 respectively.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@966 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-07-21 07:58:24 +00:00
Vladislav Bolkhovitin
9448f0d436 Fixes incorrect errors reporting on devices unregistration.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@964 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-07-20 10:34:54 +00:00
Vladislav Bolkhovitin
e609d55773 When compiling a 2.6.30 or 2.6.30.1 kernel with the
scst_exec_req_fifo-2.6.30.patch applied, the following warning is printed
many times by the compiler:

include/linux/scatterlist.h:223: warning: ‘enum km_type’ declared
inside parameter list
include/linux/scatterlist.h:223: warning: its scope is only this
definition or declaration, which is probably not what you want
include/linux/scatterlist.h:226: warning: ‘enum km_type’ declared
inside parameter list

The patch below fixes these compiler warnings by adding a forward declaration
for "enum km_type" in include/linux/scatterlist.h.

Signed-off-by: Bart Van Assche <bart.vanassche@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@963 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-07-20 09:47:36 +00:00
Bart Van Assche
803e706181 Added a check for the device size before starting the test.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@962 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-07-19 07:18:51 +00:00
Bart Van Assche
b780be7a7b Various improvements:
- Display a clear warning if the user running this script does not have
  sufficient privileges to drop the VM caches.
- Made sure that header and data columns are aligned if dd reports an
  error, e.g. when trying to perform direct I/O on a device that does
  not support direct I/O.
- Made sure that header and data columns are aligned when running a
  read-only test (-r).


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@961 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-07-18 11:55:59 +00:00
Vladislav Bolkhovitin
3ec348004f Fixes race on a scst_user device cleanup
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@958 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-07-17 10:42:32 +00:00
Bart Van Assche
29da0878e3 Added support for partial evaluation of && and || expressions.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@957 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-07-15 15:55:20 +00:00
Vladislav Bolkhovitin
dd235af55c Fixes possible crash if sgv pools destroyed too early.
Reported by Smadar Gonen <smadar.gn@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@955 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-07-14 16:56:07 +00:00