Commit Graph

1716 Commits

Author SHA1 Message Date
Vladislav Bolkhovitin
ecaabfc08c Patch fixing sparse warnings related to digest calculation
Signed-off-by: Bart Van Assche <bart.vanassche@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1881 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-27 18:34:07 +00:00
Bart Van Assche
803a312144 Replaced busy-waiting for more credits by wait_for_completion().
Moved processing delay loop out of interrupt context.
Preparations for SRP_CRED_REQ support and run-time receive queue selection.

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1880 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-27 16:23:45 +00:00
Bart Van Assche
8873db3eb6 Split a line.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1879 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-27 16:07:30 +00:00
Vladislav Bolkhovitin
a12a944d3a Consider only enabled targets for rel_tgt_id comparison
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1878 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-27 11:06:59 +00:00
Vladislav Bolkhovitin
a554b2dda6 Minor sysfs fix
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1877 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-27 10:55:44 +00:00
Bart Van Assche
747511e3b8 IB verbs compliance fix: drain the completion queues before destroying them.
Moved some thread=1 related functions in ib_srpt.c such that these are grouped in the source file.

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1876 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-25 13:13:45 +00:00
Bart Van Assche
0925119ad8 Made sure that invocation of srpt_pending_cmd_timeout() after
srpt_handle_rdma_comp() finished and before srpt_xmit_response() started works
properly.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1875 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-25 09:34:20 +00:00
Bart Van Assche
1c64261bec Increased default send queue size from 2048 to 4096 and made the send queue
size configurable via the kernel module parameter srpt_sq_size.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1874 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-25 09:15:10 +00:00
Bart Van Assche
95bba60a0a Fixed a bug in the command abortion logic that could result rmmod ib_srpt to hang.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1873 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-24 16:47:29 +00:00
Bart Van Assche
ef509acbd8 Refined the timeout error message.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1872 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-24 11:46:29 +00:00
Bart Van Assche
dc80bce266 Fixed a race between initiator and target in the algorithm for computing the REQUEST LIMIT DELTA value sent in responses towards the initiator that could cause the initiators req_lim value temporarily to exceed 128 (SRPT_RQ_SIZE). While harmless, this caused messages like "ib_srpt: ***ERROR***: req_lim = -1 < 0" to appear in the target kernel log.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1871 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-24 08:35:28 +00:00
Bart Van Assche
a9d5ab6737 Added --group_reporting.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1870 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-23 13:41:59 +00:00
Bart Van Assche
06b4f6d8aa Increased SRP initiator lockup safety margin, fixed a sparse warning and added more comments.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1869 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-23 13:41:55 +00:00
Bart Van Assche
7322ff6c24 Added an additional test.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1868 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-23 12:25:54 +00:00
Bart Van Assche
c7472c2aa6 Made sure that ib_srp initiator cannot lock up even when its I/O depth > 1.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1867 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-23 12:23:39 +00:00
Bart Van Assche
baa4b4ee29 Fixed a bug that caused trouble while handling send completions for failed data transfer commands. An example of the call stack that could be logged:
WARNING: at srpt/src/ib_srpt.c:2908 srpt_unmap_sg_to_ib_sge+0xcb/0x13e [ib_srpt]()
[ ... ]
Call Trace:
 <IRQ>  [<ffffffffa0317827>] ? srpt_unmap_sg_to_ib_sge+0xcb/0x13e [ib_srpt]
 [<ffffffff8023885a>] ? warn_slowpath_common+0x77/0x8e
 [<ffffffffa0317827>] ? srpt_unmap_sg_to_ib_sge+0xcb/0x13e [ib_srpt]
 [<ffffffffa03178f1>] ? srpt_handle_send_comp+0x57/0x7d [ib_srpt]
 [<ffffffffa0319c18>] ? srpt_send_completion+0x82/0xca [ib_srpt]
 [<ffffffffa024f646>] ? mlx4_cq_completion+0x21/0x62 [mlx4_core]
 [<ffffffffa025051e>] ? mlx4_eq_int+0x55/0x2a4 [mlx4_core]
 [<ffffffffa025077c>] ? mlx4_msi_x_interrupt+0xf/0x17 [mlx4_core]
 [<ffffffff8023cff6>] ? tasklet_action+0x64/0xb5
 [<ffffffff802675f9>] ? handle_IRQ_event+0x53/0x105
 [<ffffffff802690ac>] ? handle_edge_irq+0xda/0x11a
 [<ffffffff8020db65>] ? handle_irq+0x81/0x8a
 [<ffffffff8020d399>] ? do_IRQ+0x57/0xbf
 [<ffffffff8020c2d3>] ? ret_from_intr+0x0/0xa
 <EOI>  [<ffffffff80211ca6>] ? mwait_idle+0xa3/0xd1
 [<ffffffff8051ac1a>] ? notifier_call_chain+0x29/0x4c
 [<ffffffff8020aa61>] ? cpu_idle+0x40/0x5e
---[ end trace fef4d0c17ebda700 ]---
------------[ cut here ]------------
kernel BUG at /usr/src/redhat/BUILD/kernel-2.6.30.10/arch/x86/include/asm/dma-mapping.h:104!
invalid opcode: 0000 [#1] SMP
[ ... ]

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1866 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-23 07:38:15 +00:00
Bart Van Assche
5da3fc1f1b Rewrote four #if statements such that these can be parsed by scripts/generate-kernel-patch.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1865 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-23 07:24:27 +00:00
Vladislav Bolkhovitin
04556369b4 - Fix 2 lockdep complains
- Preliminary update for 2.6.35



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1864 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-22 17:38:51 +00:00
Mark Buechler
7bfbb41963 - When reading deprecated config files, don't configure empty groups.
- Minor formatting fix in writeConfiguration().



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1863 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-22 16:29:27 +00:00
Mark Buechler
f896acc78c - Forgot to rename sysfs to scstadmin.sysfs.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1862 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-22 14:59:08 +00:00
Mark Buechler
be6f9f219b - Rename sysfs and procfs to better names.
- Specify module use version for procfs scstadmin.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1861 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-22 14:51:08 +00:00
Mark Buechler
253c80692e - Integrate scstadmin's Makefile with enable_proc and
disable_proc so the correct scstadmin version is
  installed.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1860 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-22 14:47:16 +00:00
Richard Sharpe
5737910fb4 Put in a clearer work-around for the problem with the size of the max_cmd_size
field. The size changed at 2.6.26 from unsigned char to unsigned short.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1859 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-22 09:40:14 +00:00
Bart Van Assche
380d63a33e Updated performance measurements.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1858 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-22 08:32:50 +00:00
Bart Van Assche
34bab4bc58 Micro-optimized the IB completion handlers for modes thread=0 and thread=2.
Fixed another session unregistration race.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1857 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-22 07:43:17 +00:00
Bart Van Assche
5c6a0c9e17 Fixed bug in 'svn status -v' output parser.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1856 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-22 07:23:26 +00:00
Bart Van Assche
a8d02fbfca Enabled rdy_to_xfer_atomic for mode thread=0.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1855 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-22 05:54:55 +00:00
Mark Buechler
627b323dbe - Missed a spot where scst base attributes are getting written
even if they aren't key attributes.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1854 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-21 20:26:47 +00:00
Mark Buechler
6f8dfe947f - Handle Default and Default_ groups. Default_X groups will not
be configured if the associated target X has not been pre-configured.
- Misc. fixes.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1853 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-21 17:24:48 +00:00
Richard Sharpe
8668b22ae8 Set max_cmd_len correctly depending on the size of the field. In earlier
versions of Linux it was an unsigned char, and a value of 260 means 4 after a compiler warning. Added a comment to describe what is going on as well. Since 
this is done very infequently it should not cause performance problems and 
means that it will not silently fail to work if people try to use it on kernels
earlier than 2.6.26. If I figure out what kernel version the change was made
in we could use an ifdef.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1852 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-21 16:08:34 +00:00
Mark Buechler
ffd2803eca - When reading and old configuration file, if no targets
are enabled, add groups/initiators for all known targets.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1851 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-21 15:28:21 +00:00
Bart Van Assche
3b5d4ea5fa Fixed a copy/paste error.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1850 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-21 15:21:06 +00:00
Bart Van Assche
b5c0a25514 Module removal and session unregistration with ongoing I/O should now finally work reliably.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1849 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-21 14:22:34 +00:00
Bart Van Assche
5ded0b7660 Changes:
- Implemented a workaround for a race between ib_destroy_cq() and the IB
  completion handlers. This race could trigger a kernel crash or kernel lockup
  when unloading the ib_srpt module while I/O was ongoing or by performing
  a relogin from an SRP initiator while I/O was ongoing.
- Moved the code for handling IB completions in single-threaded mode to
  separate functions.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1848 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-21 10:52:36 +00:00
Bart Van Assche
2c663262b1 Fixed a single-letter typo in a source code comment.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1847 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-21 10:49:58 +00:00
Bart Van Assche
0e6414624e Follow-up for r1845.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1846 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-20 19:44:39 +00:00
Bart Van Assche
a9668c9f07 Micro-optimized srpt_handle_rdma_comp().
Assigned names to the three threading modes.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1845 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-20 18:40:29 +00:00
Vladislav Bolkhovitin
891c7d5b03 Fix BUG while enabling target mode remote port disappear:
In case if ELS LOGO command received on the target port,
the firmware can notify the driver about it in 3 different ways,
which handled differently by the driver (it doesn't clear when it use each way):
1. Immediate notify of login-affecting ELS command received (status code 0x46).
   The target driver terminate all commands received for the specified initiator
   (N_Port handle).
2. Asynchroneus event of port update.
   The target driver only print message, and in remark it's written that
   /* .mark_all_devices_lost() is handled by the initiator driver */
3. Immediate notify of port logged out (status code 0x29).
   The target driver terminate all commands received for the specified initiator
   (N_Port handle), and also mark all devices as lost.

In 1 and 2 everthing is OK. In 3 the target driver mark all devices as lost,
but never retrigger rescanning.

There are 2 solutions:
1. Not marking the devices as lost base on written in the async event case, and
   also base on the spec which says to only terminate all commands.
2. Mark all devices as lost and retrigger rescanning.

1 was implemented; delete all calls to mark_all_devices_lost() in qla2x00t.c, and
unexport symbol of this function in qla_os.c

Signed-off-by: Gal Rosen <galr@storwize.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1844 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-20 17:51:19 +00:00
Vladislav Bolkhovitin
9562e5679b More unexisting LUNs handling fixes
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1843 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-19 17:48:14 +00:00
Bart Van Assche
7cca01ae41 Added one more test.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1842 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-18 17:43:44 +00:00
Bart Van Assche
2d3b5d3387 Partially reverted r1416 in order to fix a data corruption issue that occurred
with highly parallel workloads.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1841 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-18 17:39:43 +00:00
Bart Van Assche
5d78905aaf Whitespace-only changes: converted spaces to tabs.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1840 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-17 20:17:45 +00:00
Bart Van Assche
3b69f969f1 Under heavily multithreaded I/O (twenty or more concurrent writers), data corruption could occur. This issue was introduced in r1506 and has now been fixed.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1839 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-17 19:50:45 +00:00
Bart Van Assche
78cb9e9458 Changed meaning of thread kernel module parameter: while 0 still stands for IRQ context, 1 does now stand for single-threaded processing and 2 for processing SCSI command via multiple kernel threads.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1838 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-17 19:21:22 +00:00
Vladislav Bolkhovitin
492e33a312 - Move nl_open() after kernel_open() to avoid issues when second start could skrew netlink states for the first instance
- Avoid compiler warn_unused_result warning



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1837 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-17 16:44:22 +00:00
Vladislav Bolkhovitin
a91af4e5d0 Cleanup inspired by IET r369
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1836 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-17 16:27:06 +00:00
Vladislav Bolkhovitin
1e7ca7a0b7 Merge of IET r341: New md5/sha1 code in ietd didn't handle the byte swap properly
for the digest counters on big endian systems.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1835 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-17 16:02:30 +00:00
Vladislav Bolkhovitin
43cfabc3cc Partial merge of IET r358 and 367: a bunch of iSNS fixes.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1834 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-17 15:57:49 +00:00
Vladislav Bolkhovitin
28dd4e5150 Patch from Bart Van Assche <bvanassche@acm.org> fixing endianness warning reported by sparse.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1833 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-17 13:53:41 +00:00
Vladislav Bolkhovitin
e79a15cc16 Some more minor sysfs fixes
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1832 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-16 20:33:10 +00:00