Commit Graph

1347 Commits

Author SHA1 Message Date
Bart Van Assche
1660fe1c3c Fixed the following category of checkpatch complaints:
2 ERROR: code indent should use tabs where possible


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1440 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-01-09 15:01:59 +00:00
Vladislav Bolkhovitin
e6ac85312b Commands can be aborted by other transports, so cmnd_rx_continue() should check scst_cmd_aborted().
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1439 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-01-08 16:19:31 +00:00
Vladislav Bolkhovitin
c6e5febf06 Mark "completed" should be cleared from being retried commands.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1438 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-01-08 16:14:49 +00:00
Vladislav Bolkhovitin
deac5b1d81 Patch from Alexey Obitotskiy <alexeyo1@open-e.com> with 2 fixes and cleanups implementing initiator-oriented access control in sysfs interface.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1437 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-01-08 16:11:13 +00:00
Vladislav Bolkhovitin
6a65d02d9b Web updates
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1436 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-01-08 16:06:21 +00:00
Bart Van Assche
3ec2a5c02c Updated kernel revisions.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1435 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-01-07 12:41:46 +00:00
Bart Van Assche
7bf99a3584 Removed some TRACE_ENTRY() / TRACE_EXIT() statements.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1434 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-01-06 20:47:08 +00:00
Bart Van Assche
754d139673 Fixed checkpatch complaints about whitespace (use tabs instead of spaces /
trailing whitespace) and the sparse complaint about using '0' as a pointer.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1433 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-01-06 20:22:15 +00:00
Bart Van Assche
ca9004962d Changes:
- srpt_release_channel_by_cmid(): the sdev->spinlock and scst_mgmt_lock are
  no longer locked nested.
- srpt_find_channel(): does now return NULL when the channel is not found
  (which never happens).


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1432 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-01-06 20:11:24 +00:00
Vladislav Bolkhovitin
05d1bbfedc A huge chunk of related to each other changes, which had to be tested together.
iSCSI-SCST: A huge improvements in errors recovery and iSCSI RFC complaince as well as performance. Also:

 - Fixes and improvements for MaxOutstandingR2T>1

 - Flow control tracing added.

 - Cleanups

SCST core:

 - Now for scst_cmd_init_stage1_done() commands preprocessing_done() is always called before xmit_response(), even in case of abort or error.

 - Fixed recently introduced bug, which can lead to sending responses for aborted commands after reply on the corresponding TM command already sent.

 - Flow control tracing added.

 - Now it is possible to call functions setting commands execution status (e.g., scst_set_cmd_error_status()) several times for the same command. Only the first call will be completed, other calls - ignored.

 - All commands are counted and shown in proc/sysfs now. Before only active, i.e. not yet executed commands, were counted and shown there.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1431 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-01-06 13:02:22 +00:00
Bart Van Assche
6a523b3c13 Added more debugging code.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1430 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-01-04 20:56:00 +00:00
Bart Van Assche
45c93135f8 Changes:
- Removed references to SCST core internal state names.
- Does no longer accept new connections while unloading.
- Module unloading should now really no longer cause a hang.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1429 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-01-04 20:26:19 +00:00
Bart Van Assche
af086e27a8 Merged two lines.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1428 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-01-04 20:13:04 +00:00
Bart Van Assche
af5ae6eeb7 Do not try to include files marked for deletion.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1427 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-01-04 20:05:53 +00:00
Bart Van Assche
388c38bfd9 Fixed typos.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1426 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-01-03 08:34:21 +00:00
Bart Van Assche
a8a72c1b51 Fixed sporadic lockup triggered by removing the ib_srpt kernel module.
The following complaint was logged by the kernel when this happened:

INFO: task rmmod:26637 blocked for more than 120 seconds.
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
rmmod         D 00000000ffffffff     0 26637  26629
 ffff88009ce9dbd8 0000000000000046 ffff88009ce9dbf8 ffffffff8052466e
 0000000000000000 0000000000000001 0000000000000001 0000000000000001
 ffff88003c24d070 00000000001d17c0 000000000000c8a0 ffff88003c24d078
Call Trace:
 [<ffffffff8052466e>] ? trace_hardirqs_on_thunk+0x3a/0x3f
 [<ffffffff80522408>] schedule+0x18/0x40
 [<ffffffff805227a5>] schedule_timeout+0x165/0x1a0
 [<ffffffff80525320>] ? _spin_unlock_irq+0x30/0x60
 [<ffffffff8023f4d9>] ? sub_preempt_count+0xa9/0xe0
 [<ffffffff80521756>] wait_for_common+0x116/0x1a0
 [<ffffffff80248850>] ? default_wake_function+0x0/0x20
 [<ffffffff8052189d>] wait_for_completion+0x1d/0x20
 [<ffffffffa06983e1>] scst_unregister_session+0x101/0x240 [scst]
 [<ffffffffa070f52f>] srpt_release+0xef/0x1e0 [ib_srpt]
 [<ffffffff805252d5>] ? _spin_unlock_irqrestore+0x65/0x80
 [<ffffffffa0693f60>] scst_unregister+0x70/0x380 [scst]
 [<ffffffff805252b2>] ? _spin_unlock_irqrestore+0x42/0x80
 [<ffffffffa0711982>] srpt_remove_one+0xa2/0x190 [ib_srpt]
 [<ffffffffa03b3105>] ib_unregister_client+0x65/0x120 [ib_core]
 [<ffffffff8027a02d>] ? trace_hardirqs_on+0xd/0x10
 [<ffffffffa0715114>] srpt_cleanup_module+0x70/0xd4 [ib_srpt]
 [<ffffffff80284f87>] sys_delete_module+0x1a7/0x270
 [<ffffffff8020cc6d>] ? retint_swapgs+0xe/0x13
 [<ffffffff80279e79>] ? trace_hardirqs_on_caller+0x29/0x1d0
 [<ffffffff8052466e>] ? trace_hardirqs_on_thunk+0x3a/0x3f
 [<ffffffff8020c21b>] system_call_fastpath+0x16/0x1b
INFO: lockdep is turned off.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1425 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-01-02 13:56:12 +00:00
Bart Van Assche
d124f1cc8e Changes:
- Decreased number of target-to-initiator request send buffers from two
  to one such that a clear error message can be printed when the SRP
  initiator did not respond to the SRP_CRED_REQ information unit.
- Bug fix: don't modify ch->last_response_req_lim when sending an SRP
  information unit that contains the REQUEST LIMIT DELTA field failed.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1424 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-01-02 12:27:32 +00:00
Bart Van Assche
e1de778c3a Changes related to credit-based SRP buffer management:
- Bug fix: don't set the REQUEST LIMIT DELTA field to SRPT_RQ_SIZE when
  sending the first reponse to the initiator but to the proper value
  (a small integer).
- An SRP_CRED_REQ information unit is now sent to the initiator if the
  number of I/O contexts available for receiving dropped below two I/O
  contexts (see also the SRP standard for more information). This change
  is required to fix the SRP initiator lockup that happens when the
  initiator sends requests faster than the target can process them. In
  order to fix the lockup, it is  also necessary to implement SRP_CRED_REQ
  support in the SRP initiator in the vanilla Linux kernel and in OFED.
  Neither kernel version 2.6.32 nor OFED 1.5 nor any previous
  version of these components supports SRP_CRED_REQ information units.
  See also http://bugzilla.kernel.org/show_bug.cgi?id=14235 for more
  information about the initiator lockup.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1423 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-01-01 17:48:07 +00:00
Bart Van Assche
0d4ba05ae8 Added and commented out the following statement:
EXTRA_CFLAGS += -DCONFIG_SCST_EXTRACHECKS


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1422 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-01-01 17:06:38 +00:00
Vladislav Bolkhovitin
ad4cde8bfe The patch below fixes the following two issues in the iscsi-scst-howto.txt
document:
* For some Linux distro's the command iscsi-iname is installed in /usr/sbin
  and for others in /sbin.
* The scst and scst_vdisk modules must be loaded before the sample scstadmin
  commands work.

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1421 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-12-28 19:58:39 +00:00
Vladislav Bolkhovitin
bab121a720 Compilation of the SCST's sysfs code triggers a section mismatch because the
function scst_sysfs_cleanup() is declared as an exit-only function while it is
also called from init_scst(). The patch below fixes this section mismatch.

This patch has been tested by verifying that the following command does not
report any section mismatches:

make CONFIG_DEBUG_SECTION_MISMATCH=y scst iscsi-scst srpt

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1420 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-12-28 19:55:45 +00:00
Bart Van Assche
d1e5f40622 Changes:
- Convert sense data to/from fixed format / descriptor format before
  sending back a response.
- Print an error message to the kernel log when an unsupported IB event
  has been received.
- Return the SCSI status BUSY instead of CHECK CONDITION when allocating
  an SCST command failed (until r1409, the SCSI status in the SRP_RSP
  information unit was set to TASK SET FULL in this case).


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1419 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-12-28 19:31:51 +00:00
Bart Van Assche
8d13d15332 Follow-up for r1415: compiles again without warnings on both 32-bit
and 64-bit systems.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1418 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-12-26 18:57:17 +00:00
Bart Van Assche
cea7193e0f Updated to do list.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1417 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-12-26 09:23:39 +00:00
Bart Van Assche
2fbe389419 Behavior changes:
- Fixed: the SCSOLNT and UCSOLNT bits were ignored in received SRP requests,
  and the SOLNT bit was not set in responses when required. This is required
  by the SRP protocol specification.
- Fixed: SRP_RSP messages must be limited to the MAXIMUM TARGET TO INITIATOR
  IU LENGTH  field indicated in the SRP_LOGIN_RSP response instead of the
  maximum message size supported by SRPT. This is also required by the SRP
  protocol specification.
- Fixed: the STATUS field of response messages with status GOOD and that
  contain sense data is no longer modified into CHECK CONDITION.
Internal changes (refactoring):
- Replaced the SCSI sense data handling data structures and code in SRPT by
  those of the SCST core.
- Moved the code for building an error response from srpt_handle_cmd() and
  srpt_handle_tsk_mgmt() to srpt_handle_new_iu().
- Removed the ioctx::data_len member.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1416 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-12-25 15:26:42 +00:00
Bart Van Assche
b895a01ca7 Fixed a recently introduced format specification mismatch.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1415 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-12-25 09:10:10 +00:00
Vladislav Bolkhovitin
3c45b44aee Move all the code from scst_cdbprobe.h to scst_lib.c where it should really belong.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1414 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-12-24 19:46:20 +00:00
Vladislav Bolkhovitin
370a015ad8 Web updates.
Tooltips code and usage provided by Greg V Zemskov <mne@greg.su> and Kirill Malkin <kirill.malkin@reldata.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1412 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-12-24 13:54:49 +00:00
Mark Buechler
14fe1bed1e - Die if /proc/scsi_tgt/version doesn't exist.
- Replace croak() with die() in the module.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1411 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-12-23 19:55:07 +00:00
Bart Van Assche
c79bc30298 Updated kernel versions 2.6.27.41, 2.6.31.8 and 2.6.32.1 to 2.6.27.42, 2.6.31.9 and 2.6.32.2 respectively.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1410 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-12-19 10:46:17 +00:00
Bart Van Assche
50c6585066 Made sure that all log lines generated by the ib_srpt kernel module
have an "ib_srpt: " prefix. Thanks to Stanley Sufficool for the patch.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1409 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-12-18 19:11:24 +00:00
Vladislav Bolkhovitin
539edfaf9b Better handling of devices, which don't support MODE SENSE control mode page
Tested-By: Dietmar Maurer <dietmar@proxmox.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1408 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-12-18 17:21:27 +00:00
Bart Van Assche
0afea875bc Made sure that checkpatch doesn't complain about missing whitespace around
the minus character in the following expression:
    tgt_dev->curr_sn = (typeof(tgt_dev->curr_sn)) -300


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1407 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-12-18 17:16:03 +00:00
Vladislav Bolkhovitin
9ebb42805f Small cleanup: there's no need to have SN's long + test on SNs overflow added
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1406 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-12-17 12:57:24 +00:00
Bart Van Assche
8e8abd54b5 Fixed the following category of complaints reported by the 2.6.32 checkpatch:
11 ERROR: that open brace { should be on the previous line


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1405 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-12-16 20:01:08 +00:00
Bart Van Assche
11044c3033 Added kernel version 2.6.32.1.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1404 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-12-16 19:51:11 +00:00
Bart Van Assche
ca47017056 Added to repository.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1403 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-12-16 19:49:19 +00:00
Bart Van Assche
eaad0ab4fb Fixed kernel version numbers.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1402 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-12-16 19:49:00 +00:00
Vladislav Bolkhovitin
67f0cefd7d Fix incorrect initialization of scst_mgmt_cmd_stub structure
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1400 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-12-16 19:24:42 +00:00
Vladislav Bolkhovitin
2b5833d90e Update for 2.6.32 + fix context of vdisk_t10_dev_id_rwlock
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1399 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-12-16 19:21:41 +00:00
Vladislav Bolkhovitin
05cf277910 Fixed incorrect "set_t10_dev_id " token size caused by rename of set_t10_device_id to set_t10_dev_id.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1398 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-12-16 11:48:29 +00:00
Vladislav Bolkhovitin
52ca079fb8 Patch from Daniel Fernandes <dfernandes1978@hotmail.com> adding missed links in 2 pages
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1397 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-12-16 11:38:54 +00:00
Vladislav Bolkhovitin
f519e2c265 Fix spelling typos.
Signed-off-by: Dotan Barak <dotanba@gmail.com>

with additional spelling fixes noticed by frank zago <fzago@systemfabricworks.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1396 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-12-16 11:35:12 +00:00
Mark Buechler
8db1080d78 - Added -noprompt option. Use with care!
- Added support for T10 device ID. Applied modified patch by witoldk1@open-e.com.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1395 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-12-15 20:01:01 +00:00
Vladislav Bolkhovitin
24c072d970 Patch from Witold Kowolik <witold.kowolik@open-e.com> ranaming SCSI ID to T10 device ID + small fix to handle spaces in t10dev_id with small changes. Particularly, I renamed everywhere t10_device_id in t10_dev_id.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1394 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-12-15 19:32:20 +00:00
Vladislav Bolkhovitin
72eb1111f0 Patch from Smadar Gonen <smadar.gn@gmail.com> with minor changes fixing race in task managmement code if several TM functions affect the same command on different stages of processing.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1392 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-12-15 18:32:13 +00:00
Bart Van Assche
e76ee7f95f Updated kernel version 2.6.31.7 to 2.6.31.8.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1391 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-12-14 19:14:23 +00:00
Bart Van Assche
6ed8923406 Spelling fix.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1390 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-12-13 18:02:39 +00:00
Bart Van Assche
50dc64fd1c Updated SRPT documentation.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1389 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-12-13 18:01:14 +00:00
Bart Van Assche
9e72c9bade Bug fix: SRQ availability counter is no longer decremented when ib_post_send() fails.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1388 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-12-13 17:59:44 +00:00