Commit Graph

4574 Commits

Author SHA1 Message Date
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
Bart Van Assche
a03c2176a8 Added an additional consistency check: an error message is now printed if
the kernel-ib-devel RPM has been installed but not the kernel-ib RPM.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1387 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-12-13 13:00:39 +00:00
Bart Van Assche
345cd34aae Whitespace-only change: fixed a checkpatch complaint.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1386 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-12-09 12:03:35 +00:00
Bart Van Assche
914b26386a Updated kernel version 2.6.27.40 to 2.6.27.41.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1385 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-12-09 11:38:11 +00:00
Bart Van Assche
36321326d9 Updated kernel versions 2.6.27.39 and 2.6.31.6 to 2.6.27.40 and 2.6.31.7 respectively.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1384 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-12-08 20:47:50 +00:00
Bart Van Assche
ca81d05dd7 Update: the __same_type() macro has been introduced in kernel version 2.6.31, not in 2.6.30.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1383 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-12-07 08:51:58 +00:00
Bart Van Assche
e4b93a83c0 - Fixed a checkpatch complaint.
- Made sure that the SRPT source code compiles again on systems with a 2.6.29
  or older kernel.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1382 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-12-07 08:07:58 +00:00
Bart Van Assche
6a9b203dd2 FMR only applies to the SRP initiator, not to the SRP target.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1381 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-12-07 07:21:39 +00:00
Bart Van Assche
799820d44b - Simplified error handling in srpt_get_desc_tbl(): incorrect indirect
descriptors are now reported by returning -EINVAL instead of setting the
  third argument to true. Removed the third argument of this function.
- Added support for SRP_CMD requests with non-zero ADDITIONAL CDB LENGTH.
  Note: support for these requests has not yet been tested -- I do not know
  of any SRP initiator that generates such requests.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1380 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-12-06 19:00:25 +00:00
Bart Van Assche
ffb2fb1f11 Updated SRPT documentation.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1379 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-12-06 12:44:47 +00:00
Bart Van Assche
001d47266c Updated to do list.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1378 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-12-06 12:37:21 +00:00
Bart Van Assche
0486e8404c - Moved two constants from ib_srpt.c to ib_srpt.h.
- Changed default value of srp_max_message_size from 4096 to 2116. This
  size corresponds to the size of an SRP_CMD request message containing
  an indirect buffer list with 128 elements.
- A warning is now printed when an SRP_CMD request is received containing
  more than one CDB -- this kind of messages is not yet supported.
- Switched back from multiple ib_dma_sync_single_for_cpu() calls to a
  single call because the latter results in better performance.
- An error message is now printed if a corrupt SRP_CMD request has been
  received. Before these were ignored silently.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1377 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-12-05 10:10:53 +00:00
Mark Buechler
60d27d6e24 - Added new vdisk_blockio and vdisk_nullio introduced by the sysfs changes.
Change by witoldk1@open-e.com.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1376 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-12-04 19:08:32 +00:00
Vladislav Bolkhovitin
7572933afe Validator fix
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1375 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-12-03 18:57:58 +00:00
Vladislav Bolkhovitin
47e976b0d8 Web updates
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1374 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-12-03 18:43:13 +00:00
Vladislav Bolkhovitin
24482f5d41 Some locking cleanups
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1373 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-11-30 19:17:59 +00:00
Bart Van Assche
7a330f2e09 Should have been included in the previous commit (r1371).
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1372 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-11-30 10:59:40 +00:00
Bart Van Assche
b371630185 Avoid dangling pointer dereferences by resetting ioctx->scmnd in srpt_on_free_cmd().
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1371 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-11-30 09:51:17 +00:00
Bart Van Assche
7cdcbc8c69 Cleanup:
- Removed a spinlock that became superfluous.
- Fixed checkpatch and sparse complaints.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1370 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-11-28 18:40:15 +00:00
Bart Van Assche
418e7fb3d6 - Split srpt_find_channel into two functions: srpt_find_channel() and
srpt_release_channel_by_cmid().
- Removed tracing statements from srpt_unmap_sg_to_ib_sge() because this
  function is now invoked while performing I/O.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1369 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-11-28 17:20:22 +00:00
Bart Van Assche
ec2e199060 Bug fixes (some introduced in the previous revision, some long-standing):
- Fixed system lockup triggered by "rmmod ib_srpt" while the SRP was writing
  data. This lockup occurred because srpt_reset_ioctx() was not resetting
  the pointers to the memory it freed, which indirectly triggered a kernel
  oops in the IB interrupt handler.
- Fixed BUG() during "rmmod ib_srpt" triggered by calling scst_rx_cmd()
  after scst_unregister_session(). This has been fixed by making sure that
  the channel state is set to RDMA_CHANNEL_DISCONNECTING before calling
  scst_unregister_session().
Performance improvements:
- Simplified cmd_wait_list manipulation code.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1368 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-11-28 16:36:53 +00:00
Bart Van Assche
f50ce17866 Bug fixes:
- Fixed races on srpt_ioctx::state manipulation by declaring this variable
  atomic.
- Fixed races on srpt_rdma_ch::state manipulation by declaring this variable
  atomic.
- Fixed bug in srpt_abort_scst_cmd(): SRPT_STATE_DATA_IN was not yet handled.
- Fixed races on srpt_rdma_ch::cm_id destruction. Clearly documented which
  object owns the cm_id at which time.
Performance improvements:
- Eliminated the list of active commands (active_scmnd_list) because this
  list was a duplicated of a list already kept by the SCST core.
- Switched to double-checked locking in srpt_handle_new_iu(). This saves one
  spin_lock_irqsave() and one spin_unlock_irqrestore() call in the common
  case (that is, a live channel).
- Eliminated RDMA channel state tests in SCST command handling callback
  functions -- removed the function srpt_abort_if_disconnecting().


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1367 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-11-28 14:03:55 +00:00
Bart Van Assche
2ff67c27cc Removed trailing whitespace.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1366 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-11-28 08:24:10 +00:00
Vladislav Bolkhovitin
69d7b1eba7 Patch from Witold Kowolik <witoldk1@open-e.com> implementing manual setting of SCSI ID on vdisk devices (with some changes)
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1365 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-11-27 18:52:23 +00:00