Commit Graph

926 Commits

Author SHA1 Message Date
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
Vladislav Bolkhovitin
d29bd7bc2f Updated version of scsi_exec_async() with important fixes. Particularly:
- A bunch of memory corruptions was fixed
 - For cases if scst_exec_req_fifo-2.6.30+.patch not applied, implementation from the patch was added to scst_lib.c. So, now for 2.6.30+ kernels scst_exec_req_fifo-2.6.X.patch is optional



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@953 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-07-14 15:39:57 +00:00
Vladislav Bolkhovitin
f68bcf7b23 On ppc64, gcc 4.4 spews lots of..
drivers/scsi/qla2xxx/qla_def.h:1485:7: warning: "__LITTLE_ENDIAN" is not defined

Signed-off-by: Dave Jones <davej@redhat.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@952 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-07-14 11:06:17 +00:00
Vladislav Bolkhovitin
b12dbb01cc Web fixes
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@951 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-07-14 10:50:18 +00:00
Vladislav Bolkhovitin
dd0e9cfa90 Minor web fixes
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@950 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-07-13 11:59:25 +00:00
Vladislav Bolkhovitin
a86fe7bf80 Web updates
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@949 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-07-13 11:37:28 +00:00
Vladislav Bolkhovitin
d29b6e4f63 The patch below fixes the following checkpatch complaint:
ERROR: return is not a function, parentheses are not required
A side effect of this patch is that it makes sure that the return value of
is_report_sg_limitation() is either 0 or 1, and no other integer value.

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@948 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-07-10 18:21:11 +00:00
Bart Van Assche
e564749845 Removed trailing whitespace.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@947 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-07-10 12:10:41 +00:00
Vladislav Bolkhovitin
87f2720490 Removes unneeded mutex_lock(&scst_mutex), which can't be done on atomic or SIRQ context
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@946 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-07-10 11:56:51 +00:00
Vladislav Bolkhovitin
63b86adb27 Fixes wrong usage of parent request's fields in the response.
Reported by Erez Zilber <erezzi.list@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@945 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-07-09 18:38:54 +00:00
Vladislav Bolkhovitin
e0fed3bef6 Adds export of blk_rq_unmap_kern_sg(), which is needed if SCSI built as a module.
Noticed by Bart Van Assche <bart.vanassche@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@944 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-07-09 17:48:28 +00:00
Bart Van Assche
950731c2e8 Simplified and generalized code for processing in-tree kernel patches.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@943 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-07-09 07:01:57 +00:00
Bart Van Assche
3a369e462d Whitespace-only change: fixed an error reported by checkpatch.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@942 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-07-09 07:00:57 +00:00
Bart Van Assche
901e476100 Whitespace-only changes: fixed two errors reported by checkpatch.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@941 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-07-09 06:29:58 +00:00
Bart Van Assche
88670dbee9 Added 2.6.30.1 kernel.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@939 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-07-08 17:51:24 +00:00
Vladislav Bolkhovitin
37ba91d275 Update for 2.6.30
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@938 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-07-08 17:27:30 +00:00
Vladislav Bolkhovitin
1d672afe89 Emulex related web updates
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@937 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-07-08 17:11:41 +00:00
Vladislav Bolkhovitin
4ab6ce4c5a More web updates
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@936 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-07-08 11:54:44 +00:00
Vladislav Bolkhovitin
6e22e39cfa Web updates
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@935 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-07-08 11:49:55 +00:00
Dotan Barak
7426cbb244 Only use LOAD_RISC_RAM_EXTENDED if you have to. This just might
fix some of the 24XX and 23XX startup problems that have been
reported but are hard to predictably reproduce.

Do some minor sync with the mainline.




git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@934 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-07-07 17:05:06 +00:00
Bart Van Assche
6947c6168e Added command-line option -t, which allows to drop the caches of the target too. Added dd flag conv=notrunc to write performance tests, which makes running blockdev-perftest on files instead of devices a lot easier.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@933 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-07-06 17:43:47 +00:00
Bart Van Assche
ed81fdc037 Fixed a bug that was introduced in the previous revision: the script entered an infinite loop when the size specified through -s was smaller than 64MB.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@932 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-07-03 19:54:09 +00:00
Bart Van Assche
2de35d6ad4 Fixed the following issue reported by lockdep:
------------[ cut here ]------------
WARNING: at kernel/lockdep.c:2197 trace_hardirqs_on_caller+0x14c/0x1b0()
Call Trace:
 <IRQ>
 [<ffffffff8024636f>] warn_slowpath+0xaf/0x110
 [<ffffffff8026e1be>] ? check_usage_forwards+0x5e/0xc0
 [<ffffffff8026e818>] ? mark_lock+0x538/0xcc0
 [<ffffffff802ccfc1>] ? cache_alloc_refill+0x191/0x2b0
 [<ffffffff804ee62b>] ? _spin_unlock_irq+0x2b/0x40
 [<ffffffff8026f23c>] trace_hardirqs_on_caller+0x14c/0x1b0
 [<ffffffff8026f2ad>] trace_hardirqs_on+0xd/0x10
 [<ffffffff804ee62b>] _spin_unlock_irq+0x2b/0x40
 [<ffffffffa0657711>] srpt_handle_new_iu+0x2f1/0x630 [ib_srpt]
 [<ffffffffa0657bab>] srpt_completion+0x15b/0x300 [ib_srpt]
 [<ffffffffa04321f2>] mlx4_ib_cq_comp+0x12/0x20 [mlx4_ib]
 [<ffffffffa01f42aa>] mlx4_cq_completion+0x3a/0x80 [mlx4_core]
 [<ffffffffa01f5585>] mlx4_eq_int+0x295/0x2a0 [mlx4_core]
 [<ffffffffa01f561f>] mlx4_msi_x_interrupt+0xf/0x20 [mlx4_core]
 [<ffffffff80288565>] handle_IRQ_event+0x35/0x70
 [<ffffffff8028a144>] handle_edge_irq+0xb4/0x150
 [<ffffffff8020eb71>] do_IRQ+0x81/0x110
 [<ffffffff8020ced3>] ret_from_intr+0x0/0xf
 <EOI>
 [<ffffffff803b1a88>] ? cfb_imageblit+0x578/0x5a0
 [<ffffffff803aaf09>] ? bit_putcs+0x3d9/0x6a0
 [<ffffffff8026f252>] ? trace_hardirqs_on_caller+0x162/0x1b0
 [<ffffffff8026f2ad>] ? trace_hardirqs_on+0xd/0x10
 [<ffffffff804eb425>] ? thread_return+0x3d/0x928
 [<ffffffff803ab49b>] ? soft_cursor+0x1ab/0x220
 [<ffffffff803aaac7>] ? bit_cursor+0x647/0x6b0
 [<ffffffff803a4a9b>] ? fbcon_putcs+0x1cb/0x320
 [<ffffffff803aab30>] ? bit_putcs+0x0/0x6a0
 [<ffffffff803a7506>] ? fbcon_redraw+0x166/0x1d0
 [<ffffffff803a7770>] ? fbcon_scroll+0x200/0xd50
 [<ffffffff803f7af0>] ? scrup+0x100/0x110
 [<ffffffff803f7c7d>] ? lf+0x6d/0x70
 [<ffffffff803fbb1d>] ? do_con_write+0x9dd/0x2300
 [<ffffffff8026eff6>] ? mark_held_locks+0x56/0xa0
 [<ffffffff8026f252>] ? trace_hardirqs_on_caller+0x162/0x1b0
 [<ffffffff803fd499>] ? con_write+0x19/0x30
 [<ffffffff803ea683>] ? n_tty_write+0x383/0x480
 [<ffffffff8026f2ad>] ? trace_hardirqs_on+0xd/0x10
 [<ffffffff8023d7d0>] ? default_wake_function+0x0/0x10
 [<ffffffff803e76f4>] ? tty_write+0x1b4/0x280
 [<ffffffff803ea300>] ? n_tty_write+0x0/0x480
 [<ffffffff802d312b>] ? vfs_write+0xcb/0x170
 [<ffffffff802d32c0>] ? sys_write+0x50/0x90
 [<ffffffff8020c51b>] ? system_call_fastpath+0x16/0x1b
 ---[ end trace 954f4d9b9b9cdecc ]---


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@931 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-07-03 19:15:15 +00:00