Vladislav Bolkhovitin
87ce86ee2d
Cosmetics
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5394 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-26 22:16:16 +00:00
Bart Van Assche
c196d7bbcd
ib_srpt: Make srpt_abort_cmd() state checks more strict
...
Complain if srpt_abort_cmd() is called for an I/O context that is
being processed by SCST and not by the HCA.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5393 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-26 12:00:43 +00:00
Bart Van Assche
6944885268
ib_srpt: Suppress superfluous error messages
...
Only complain about a missing completion for I/O contexts that are
in a state where the ib_srpt driver is waiting for the HCA.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5392 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-26 11:59:37 +00:00
Bart Van Assche
fa5aab6390
ib_srpt: Clean up srpt_handle_rdma_err_comp()
...
This patch does not change any functionality.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5391 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-26 11:58:25 +00:00
Bart Van Assche
047e51173a
ib_srpt: Clean up srpt_handle_send_err_comp()
...
This patch does not change any functionality.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5390 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-26 11:56:59 +00:00
Bart Van Assche
464b182c2b
ib_srpt: Clean up srpt_handle_rdma_comp()
...
This patch does not change any functionality.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5389 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-26 11:56:13 +00:00
Vladislav Bolkhovitin
056f902912
scst_vdisk: Fix READ CAPACITY(10)
...
SBC-2 defines the LBA as a 32-bit field that starts at offset 2 and
not as a 64-bit field.
Reported-by: Mike Christie <michaelc@cs.wisc.edu >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5388 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-26 03:23:57 +00:00
Vladislav Bolkhovitin
b19ae27cd2
scst: Clarify a comment
...
The comment above scst_nexus_loss() is somewhat confusing so change
it into something that is more clear.
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5387 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-26 03:22:16 +00:00
Vladislav Bolkhovitin
0c66b8aaf7
iscsi-scst: Introduce ARRAY_SIZE()
...
This patch does not change any functionality.
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5386 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-26 03:21:25 +00:00
Vladislav Bolkhovitin
eae78fb98c
scst_local: Remove two superfluous tests
...
The to_scst_lcl_sess() macro is based on container_of() and hence never
returns NULL. Hence remove the two tests that compare the result of that
macro against NULL.
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5385 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-26 03:20:04 +00:00
Vladislav Bolkhovitin
3430da5f9f
Cleanup
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5384 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-26 03:18:36 +00:00
Vladislav Bolkhovitin
ca14799ca7
documentation: Document SCST_SERIALIZED and SCST_STRICTLY_SERIALIZED
...
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5383 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-26 03:18:03 +00:00
Vladislav Bolkhovitin
ff2b53ff9b
Black hole functionality added
...
Scst_mutex intentially used directly in the sysfs handler, because
comming sysfs improvements will allow that.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5382 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-26 02:31:52 +00:00
Bart Van Assche
2986fbafd9
nightly build: Update kernel versions
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5371 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-25 16:19:00 +00:00
Bart Van Assche
e72f83a05a
ib_srpt: Avoid waiting for missing error completions
...
Apparently with mlx4 firmware up to and including 2.30.8000 it is not
guaranteed that for a QP associated with an SRQ error completions are
generated for all pending work requests. Avoid triggering
srpt_pending_cmd_timeout() for missing error completions.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5370 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-24 12:07:43 +00:00
Bart Van Assche
b95b1f4d6c
ib_srpt: Add a kernel warning
...
Invoking srpt_zerolength_write() before the queue pair has reached
the error state is a bug, so complain loudly if that happens.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5369 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-24 12:04:44 +00:00
Bart Van Assche
ada7c26a2e
ib_srpt: Fix a kernel warning
...
Avoid that the following (very rare) kernel warning is reported
when an ib_srpt target port is disabled while I/O is ongoing:
WARNING: CPU: 3 PID: 12259 at srpt/src/ib_srpt.c:3334 srpt_xmit_response+0x165/0x300 [ib_srpt]()
Unexpected command state 6
Call Trace:
[<ffffffff814a15dc>] dump_stack+0x4e/0x7a
[<ffffffff8104bc5d>] warn_slowpath_common+0x7d/0xa0
[<ffffffff8104bccc>] warn_slowpath_fmt+0x4c/0x50
[<ffffffffa0771525>] srpt_xmit_response+0x165/0x300 [ib_srpt]
[<ffffffffa082aacc>] scst_xmit_response+0xbc/0x560 [scst]
[<ffffffffa083123d>] scst_process_active_cmd+0x29d/0x7b0 [scst]
[<ffffffffa0832bd9>] scst_do_job_active+0x89/0x1a0 [scst]
[<ffffffffa0832e4f>] scst_cmd_thread+0x15f/0x350 [scst]
[<ffffffff810766cd>] kthread+0xed/0x110
[<ffffffff814b312c>] ret_from_fork+0x7c/0xb0
---[ end trace 591f7af7d006fc0e ]---
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5368 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-24 12:03:09 +00:00
Bart Van Assche
de3ed1e6ec
ib_srpt: Micro-optimize srpt_adjust_srq_wr_avail()
...
The overhead of atomic_add_return() is lower than that of a
spin_lock() / spin_unlock() pair, hence switch to the former.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5367 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-24 12:01:07 +00:00
Bart Van Assche
a0cd399507
ib_srpt: Clean up srpt_destroy_ch_ib()
...
All callers guarantee that the completion queue is empty so it is
not necessary to invoke ib_poll_cq() from inside this function.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5366 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-24 11:59:27 +00:00
Bart Van Assche
a4cf36ba4e
ib_srpt: Change the severity level of a log message
...
Make sure that target port state changes get logged even with
debugging disabled.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5365 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-24 11:57:39 +00:00
Bart Van Assche
b40f69db8b
ib_srpt: Add newline at the end of kernel warning statements
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5364 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-24 11:55:56 +00:00
Bart Van Assche
d1e1e480ed
ib_srpt: Clarify a kernel-doc comment
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5363 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-24 11:53:00 +00:00
Vladislav Bolkhovitin
b91c338235
Fix error recovery of internal commands
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5362 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-21 23:12:42 +00:00
Bart Van Assche
3c5a901bf0
srpt/Makefile: Avoid that the build process depends on source control tools
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5361 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-21 16:29:26 +00:00
Vladislav Bolkhovitin
4a5b7bc8e6
In VERIFY commands BYTCHK 1x is not supported (yet)
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5360 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-21 01:58:13 +00:00
Bart Van Assche
a2917b0fec
scst_const.h: Make COMPARE_AND_WRITE definition available for kernel versions 3.6..3.11
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5359 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-20 16:10:19 +00:00
Bart Van Assche
46b583a918
srpt/session-management.txt: Document how sessions are managed by the ib_srpt driver
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5358 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-20 15:26:48 +00:00
Bart Van Assche
fe6ad820db
ib_srpt: Rework waiting for last WQE
...
After having changed the queue pair state into "error", queue an additional
work request instead of waiting for the last WQE event.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5357 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-20 15:25:34 +00:00
Bart Van Assche
46aa72be44
ib_srpt: Defer destroying the QP until the TimeWait state has been left
...
This is necessary to avoid that a login gets rejected due to reusing a
queue pair number that has not yet been freed by the target side.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5356 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-20 15:24:18 +00:00
Bart Van Assche
7efb024a7d
ib_srpt: Simplify channel state management code
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5355 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-20 15:23:16 +00:00
Bart Van Assche
0433a5c965
ib_srpt: Rework multi-channel support
...
Store initiator and target port ID's once per nexus instead of in each
channel data structure.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5354 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-20 15:22:19 +00:00
Bart Van Assche
ef2deeadae
ib_srpt: Micro-optimize polling
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5353 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-20 15:20:55 +00:00
Bart Van Assche
d7e06bba9f
ib_srpt: Introduce a temporary variable in srpt_handle_new_iu()
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5352 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-20 15:19:34 +00:00
Bart Van Assche
e61e0beae6
ib_srpt: Sync information unit memory only once
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5351 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-20 15:19:05 +00:00
Bart Van Assche
bfae911b39
ib_srpt: Micro-optimize SRP_CMD parsing
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5350 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-20 15:18:38 +00:00
Bart Van Assche
91358f846c
ib_srpt: Avoid that cmd_wait_list processing triggers command reordering
...
Although harmless for SCSI commands with SIMPLE ordering, avoid that commands
received before RTU can get reordered.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5349 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-20 15:18:06 +00:00
Bart Van Assche
f44bd8a7fa
ib_srpt: Fix an error reported by the kerneldoc tool
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5348 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-20 15:17:04 +00:00
Bart Van Assche
ecc0a4a25d
ib_srpt/Makefile: Add kerneldoc target
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5347 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-20 15:16:27 +00:00
Bart Van Assche
aa726929fa
ib_srpt: Handle GID change events properly
...
The mlx4_core driver generates a GID change event after a port has been
changed from IB into Ethernet mode. Avoid that this causes the following
error message to appear in the system log:
ib_srpt: ***ERROR***: received unrecognized IB event 18
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5346 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-20 15:15:54 +00:00
Bart Van Assche
f213e944cf
ib_srpt: Micro-optimize I/O context state manipulation
...
All ioctx->state manipulations are serialized per command so it is
not necessary to use locking to protect these manipulations.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5345 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-20 15:14:45 +00:00
Bart Van Assche
e16e4beb3b
ib_srpt: Simplify srpt_handle_cmd()
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5344 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-20 15:13:50 +00:00
Yan Burman
4beae6794e
isert: Make sure we cleanup all states if resource allocation fails
...
Signed-off-by: Yan Burman <yanb@mellanox.com >
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5343 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-19 14:30:54 +00:00
Yan Burman
a892d7b0b3
isert: Avoid hanging scst_mgmtd in case of login response send failure
...
The following is seen if isert_login_rsp_tx fails, since we do not destroy the created sysfs.
[ 840.532111] INFO: task scst_mgmtd:4614 blocked for more than 120 seconds.
[ 840.532174] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[ 840.532230] scst_mgmtd D ffff8800371c4ee0 0 4614 2 0x00000000
[ 840.532233] ffff8800378d1bd8 0000000000000046 ffff8800378d1b78 ffff88007e513ec0
[ 840.532236] ffff8800378d1fd8 ffff8800378d1fd8 ffff8800378d1fd8 0000000000013ec0
[ 840.532238] ffff880077b28000 ffff8800379c9740 ffff8800378d1bc8 7fffffffffffffff
[ 840.532241] Call Trace:
[ 840.532249] [<ffffffff816f33b9>] schedule+0x29/0x70
[ 840.532253] [<ffffffff816f1b35>] schedule_timeout+0x1e5/0x250
[ 840.532259] [<ffffffff8105b36a>] ? console_unlock+0x1a/0x30
[ 840.532263] [<ffffffff816f320f>] wait_for_common+0xdf/0x180
[ 840.532286] [<ffffffffa05efaf5>] ? debug_print_with_prefix+0x165/0x1f0 [scst]
[ 840.532289] [<ffffffff81092190>] ? try_to_wake_up+0x200/0x200
[ 840.532291] [<ffffffff816f338d>] wait_for_completion+0x1d/0x20
[ 840.532302] [<ffffffffa05e1307>] scst_kobject_put_and_wait+0x177/0x220 [scst]
[ 840.532314] [<ffffffffa05e8d13>] scst_sess_sysfs_del+0xb3/0x180 [scst]
[ 840.532324] [<ffffffffa05d747a>] scst_free_session+0xaa/0x2c0 [scst]
[ 840.532326] [<ffffffff816f1eed>] ? mutex_lock+0x1d/0x50
[ 840.532336] [<ffffffffa05d772c>] scst_free_session_callback+0x9c/0x170 [scst]
[ 840.532343] [<ffffffffa05b14fe>] ? __raw_spin_unlock_irq+0xe/0x10 [scst]
[ 840.532350] [<ffffffffa05c4370>] scst_global_mgmt_thread+0x2e0/0x560 [scst]
[ 840.532354] [<ffffffff8107fdd0>] ? add_wait_queue+0x60/0x60
[ 840.532362] [<ffffffffa05c4090>] ? scst_register_session_non_gpl+0x20/0x20 [scst]
[ 840.532364] [<ffffffff8107f210>] kthread+0xc0/0xd0
[ 840.532366] [<ffffffff8107f150>] ? flush_kthread_worker+0xb0/0xb0
[ 840.532369] [<ffffffff816fd0ac>] ret_from_fork+0x7c/0xb0
[ 840.532372] [<ffffffff8107f150>] ? flush_kthread_worker+0xb0/0xb0
Signed-off-by: Yan Burman <yanb@mellanox.com >
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5342 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-19 14:30:48 +00:00
Yan Burman
a89367848e
isert: Print error to user if QueuedCommands value exceeds supported maximum
...
Signed-off-by: Yan Burman <yanb@mellanox.com >
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5341 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-19 14:30:42 +00:00
Vladislav Bolkhovitin
20e99f16be
scst/README: Show how to read SCST sysfs attributes
...
Make the behavior of SCST sysfs attributes more clear by adding
examples in scst/README of code for reading and writing these attributes.
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5340 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-19 04:28:46 +00:00
Bart Van Assche
c43bf7e435
ib_srpt: Avoid that session logout hangs sporadically
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5339 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-18 15:35:13 +00:00
Bart Van Assche
bcc5cefce8
srpt: Minor buid process terminology change
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5338 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-16 13:38:50 +00:00
Bart Van Assche
9fd28d336a
scripts/kernel-functions: Kernel 3.13.6 build fix
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5337 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-15 06:47:26 +00:00
Vladislav Bolkhovitin
3ffd2cf674
Cleanup
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5336 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-15 02:13:58 +00:00
Vladislav Bolkhovitin
551dd518ac
Fix URL to SCST website
...
Signed-off-by: Steven J. Magnani <steve@digidescorp.com >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5335 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-15 02:09:17 +00:00