Commit Graph

4076 Commits

Author SHA1 Message Date
Bart Van Assche
7110fcbc00 scst_vdisk: Build fix for kernels < 2.6.36 (see also r5416)
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5422 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-04-16 06:35:19 +00:00
Bart Van Assche
0fb32cca26 scst_targ: Fix a checkpatch complaint
Avoid that checkpatch reports the following message:

ERROR: space required before the open parenthesis '('


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5421 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-04-16 06:17:19 +00:00
Vladislav Bolkhovitin
5d14759c69 Follow up for r5418: some cleanups and fixes
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5420 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-04-16 02:24:44 +00:00
Vladislav Bolkhovitin
77732f149c Cleanup
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5419 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-04-16 01:05:49 +00:00
Vladislav Bolkhovitin
d57ea322de REPORT SUPPORTED OPERATION CODES added
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5418 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-04-16 01:02:50 +00:00
Vladislav Bolkhovitin
14a331e0f2 Add NULLIO VERIFY
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5417 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-04-15 22:17:34 +00:00
Vladislav Bolkhovitin
914682b8c2 Make HEAD OF QUEUE requests sync
Since the block layer has no way to specify bio as HQ, there's no
choice, but to use every measure to approximate it as close as possible.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5416 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-04-15 22:04:54 +00:00
Vladislav Bolkhovitin
723d233193 Add SYNCHRONIZE_CACHE(16)
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5415 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-04-15 21:30:26 +00:00
Vladislav Bolkhovitin
bc312dc988 Fix READ(6)/WRITE(6)
LBA in those commands is 3 bytes long, not 2.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5414 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-04-15 21:26:06 +00:00
Bart Van Assche
679d1c637e ib_srpt: Fix a sparse warning
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5413 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-04-15 06:03:59 +00:00
Vladislav Bolkhovitin
6a01628b2f vdisk_blockio: Reenable COMPARE AND WRITE
The COMPARE AND WRITE implementation has been tested as follows against
an SCST vdisk_blockio device:

lba=7
bdev=$bdev
for ((i=0;i<4;i++)); do dd if=/dev/urandom of=b$i bs=8k count=1; done
for p in "0 1" "1 2" "2 3" "3 0"; do set $p; cat b$1 b$2 >b$1$2; done
dd if=/dev/urandom of=$bdev
dd if=b0 of=$bdev seek=$lba
md5sum $bdev
for ((i=0;i<10000;i++)); do for f in b01 b12 b23 b30; do sg_compare_and_write -l $lba -i $f -n 16 -x 16384 $bdev; done; done
md5sum $bdev

Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5412 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-04-09 23:59:02 +00:00
Vladislav Bolkhovitin
836481737a vdisk_blockio: Specify REQ_SYNC for synchronous I/O requests
Using READ_SYNC instead of READ increases the priority of read requests.
Using WRITE_SYNC instead of REQ_WRITE increases the priority of write
requests and avoids that the CFQ scheduler queues such writes waiting
for further write requests.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5411 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-04-09 23:58:20 +00:00
Bart Van Assche
c664dcb277 scstadmin: List keys alphabetically in the -list_sessions output
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5410 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-04-06 20:26:08 +00:00
Bart Van Assche
ef9d1b9001 scstadmin: Restore LUNs in "scstadmin -list_sessions" output
Signed-off-by: Dave Butler <tears.the@gmail.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5409 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-04-06 20:13:53 +00:00
Bart Van Assche
bdb02c55f4 nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5407 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-04-04 05:56:25 +00:00
Bart Van Assche
ead35aa554 scripts/specialize-patch: Rework r5405
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5406 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-04-04 05:50:52 +00:00
Bart Van Assche
366970312c scripts/specialize-patch: Handle numbers surrounded by parentheses properly
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5405 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-04-04 04:38:33 +00:00
Vladislav Bolkhovitin
c77aa44ef0 Fix typo in scst_report_supported_tm_fns() reported by Steve Magnani <steve.magnani@digidescorp.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5404 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-04-04 00:57:30 +00:00
Bart Van Assche
b668ab5a6e ib_srpt: RHEL 6.5 build fix
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5403 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-04-03 15:58:16 +00:00
Bart Van Assche
b7cad33563 vdisk_blockio: Fix the (recently enabled) VERIFY command
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5402 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-04-01 21:05:31 +00:00
Bart Van Assche
bb1e348260 vdisk_blockio: Temporarily disable COMPARE AND WRITE support
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5401 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-04-01 17:46:36 +00:00
Vladislav Bolkhovitin
243bc2afcb Cleanup
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5400 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-29 01:07:22 +00:00
Bart Van Assche
8dc624dae3 scripts/generate-kernel-patch: Fix for kernel versions 3.7, 3.10, 3.12 and 3.13
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5399 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-27 08:39:53 +00:00
Bart Van Assche
610ec9cb10 Avoid that checkpatch complains that return is not a function
Avoid that checkpatch reports the following error message:

ERROR: return is not a function, parentheses are not required


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5398 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-27 08:34:27 +00:00
Bart Van Assche
b1587fa6eb Fix two checkpatch complaints about whitespace
Avoid that checkpatch reports the following error message:

ERROR: "(foo*)" should be "(foo *)"


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5397 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-27 08:27:45 +00:00
Vladislav Bolkhovitin
b25163e9c1 Possibility to specify SCSI target device name added
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5396 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-27 01:57:08 +00:00
Vladislav Bolkhovitin
8599ec4452 Reimplement dropping of TM requests in a more reliable manner
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5395 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-26 23:51:36 +00:00
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