Commit Graph

2717 Commits

Author SHA1 Message Date
Vladislav Bolkhovitin
2e400cbcdc Docs updates. Update for qla2x00t-howto-debian.html was sent by Barry Schut <b.schut@iu.nl>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3609 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-24 00:46:02 +00:00
Bart Van Assche
d5757a2e11 Kernel version updates
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3608 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-23 18:23:38 +00:00
Bart Van Assche
fd5df29c9c ib_srpt: Remove two superfluous blank lines
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3607 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-22 19:28:15 +00:00
Bart Van Assche
0c0cf3215b scstadmin: Multiple -write_config bug fixes.
Bug fixes:
- Do not write out the line "# Non-key attributes" for the top level if -nonkey
  has not been specified.
- If -nonkey has been specified, write out the device handler creation time
  attributes too (blocksize, o_direct, read_only, removable, ...).
- If -nonkey has been specified, write out the LUN creation time attributes
  too (read_only).

Also, simplify the -write_config implementation by introducing the Perl
subroutines serializeKeyAttr() and serializeNkAttr().


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3606 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-22 19:18:39 +00:00
Vladislav Bolkhovitin
6a6dd2bf08 Fix crash on TP check, if file name is NULL
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3603 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-20 20:40:32 +00:00
Vladislav Bolkhovitin
5ff5d0e667 Cleanup
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3601 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-20 20:09:04 +00:00
Bart Van Assche
f9488e7083 scstadmin: Minor source code simplification
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3600 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-19 18:43:31 +00:00
Bart Van Assche
08b55c2ce9 scstadmin: Another return value consistency improvement
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3599 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-19 17:30:41 +00:00
Bart Van Assche
5d77498e7a scstadmin: Use 1 instead of TRUE where an integer exit code is returned
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3598 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-19 16:58:29 +00:00
Bart Van Assche
990d1aae3c scstadmin: Escape a single quote in order not to confuse syntax highlighting editors
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3597 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-19 16:39:52 +00:00
Bart Van Assche
6719d96059 scstadmin: Fix a typo
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3596 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-19 16:38:53 +00:00
Bart Van Assche
d2f4998270 scstadmin(sysfs): Make writing top-level non-key attributes work. Do not indent these attributes.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3593 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-19 06:21:49 +00:00
Bart Van Assche
ad3db777e6 Remove a recently introduced blank line
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3592 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-19 06:11:03 +00:00
Vladislav Bolkhovitin
daa5da87af Several wait loops in the SCST source code are similar. Move the common code
into a new macro called wait_event_locked().

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

+

Micro-optimize wait_event_locked(). Switch from default_wake_function() to
autoremove_wake_function() (via DEFINE_WAIT()). The result is that
wait_queue_head_t.lock is locked once instead of twice for wakeup + wait queue
removal.

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3591 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-18 21:15:59 +00:00
Vladislav Bolkhovitin
82fd6b42e5 Return max unmap LBA count in the blocks limits page as well
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3590 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-18 21:00:14 +00:00
Bart Van Assche
6020683851 ib_srpt: Update dynamic LUN documentation
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3589 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-18 11:40:06 +00:00
Vladislav Bolkhovitin
cac9e30338 Unmap fixes
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3588 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-17 22:38:00 +00:00
Vladislav Bolkhovitin
5a18989468 Auto set thin provisioning for BLOCKIO devices
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3587 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-17 22:35:12 +00:00
Vladislav Bolkhovitin
28fd3bef3c RHEL6 fix
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3586 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-17 22:34:04 +00:00
Bart Van Assche
feab0a9fe9 ib_srpt README: Add a paragraph about adding and removing LUNs dynamically
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3585 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-17 17:53:06 +00:00
Bart Van Assche
cb5792f74d qla2x00t: Fix a checkpatch complaint about whitespace
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3584 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-17 10:58:46 +00:00
Vladislav Bolkhovitin
ae269f6189 With NPIV initiators being destroyed and recreated, the loop_id and/or
the d_id of a virtual initiator may change. The current implementation not
always catches these changes, which leads to wrong virtual devices
being presented to the initiators. This can lead to i.e. corruption of LUN
content and multiple initiators writing to the same LUN, although the
LUN's access group only contains a single port.

Until a better solution is found, we schedule a session deletion for the
nexus when receiving an ELS  port logout message. That way SCST
will re-initialize both loop_id and d_id when the initiator reconnects
before the actual deletion takes place. The performance impact is
minimal (few milliseconds) and currently necessary.

Signed-off-by: Jens-U. Mozdzen <jmozdzen@nde.ag>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3583 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-17 02:43:05 +00:00
Vladislav Bolkhovitin
4eadecd70d Docs update from Bart Van Assche <bvanassche@acm.org>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3582 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-17 02:34:21 +00:00
Vladislav Bolkhovitin
bc933d59c7 Unmap improvements
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3579 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-15 20:16:59 +00:00
Vladislav Bolkhovitin
e13e0e507a Logging improvements and cleanups
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3578 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-15 20:15:56 +00:00
Vladislav Bolkhovitin
7c6431beb4 Merge on the mainline qla2xxx git revision 0f19bc681ed0849a2b95778460a0a8132e3700e2:
Fix MSIX lockdep complain.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3577 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-15 20:12:56 +00:00
Bart Van Assche
00efb5c667 ib_srpt: Internal change to the credit algorithm. No externally observable behavior is changed.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3575 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-13 12:38:18 +00:00
Bart Van Assche
93da6cc2b9 ib_srpt: Convert srpt_rdma_ch.sq_wr_avail from an atomic into a spinlock-protected integer
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3574 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-13 12:35:41 +00:00
Bart Van Assche
cee16c8117 ib_srpt: Disable IB completion notifcations after having received the LAST_WQE notification / show how many SCST commands are still in progress while waiting for session unregistration
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3573 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-13 12:32:10 +00:00
Bart Van Assche
46f0460602 ib_srpt: Export RDMA channel state to sysfs
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3572 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-13 12:26:51 +00:00
Bart Van Assche
0e3137524d ib_srpt: Make srpt_rdy_to_xfer() handle IB send queue overflow correctly.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3571 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-13 12:22:33 +00:00
Bart Van Assche
82d03efb88 ib_srpt: Restore timeout handler (reverts r3537).
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3570 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-13 12:19:01 +00:00
Bart Van Assche
562809a2da /etc/init.d/scst: Improved /etc/scst.conf parsing robustness for manually edited scst.conf files
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3569 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-11 15:55:49 +00:00
Bart Van Assche
aa199d8ef6 /etc/init.d/scst: Relax parsing of /etc/scst.conf. Accept sequences of blanks and tabs instead of only spaces when looking for device handler and target driver names.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3568 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-11 10:26:25 +00:00
Bart Van Assche
4ce84f3edb More /etc/init.d/scst tuning:
- Works now if the SCST modules have been compiled into the kernel (=Y) instead of being compiled as modules (=M).
- Rename DAEMONS into SCST_DAEMONS.
- Use the same name for loading and removing the iSCSI kernel module (iscsi_scst).
- Set the path after having read /lib/lsb/init-functions instead of before.
- Remove the path from the killall command.
- When parsing /etc/default/scst, handle both parameters with and without embedded spaces correctly.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3567 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-10 18:03:11 +00:00
Bart Van Assche
2debac5ced Slackware: Do not suggest the user to run a script to activate /etc/init.d/scst on boot because such a script does not exist on Slackware.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3566 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-10 18:03:06 +00:00
Bart Van Assche
f0336fced9 Follow-up for r3564: add sample /etc/default/scst file
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3565 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-10 17:56:56 +00:00
Vladislav Bolkhovitin
7bde8810f5 Currently there are three different init scripts inside the SCST project:
scst, iscsi-scst and qla2x00t. This makes it unnecessary hard for users to
run several target drivers simultaneously. Additionally, several variants of
these init scripts exist for different distributions. This patch unifies all
these init scripts into a single init script. Additionally, some new features
have been added:
- Kernel module parameters can now be specified per kernel module in
  /etc/default/scst. An example:
 ib_srpt_parameters="thread=1 srp_max_req_size=4200"
- When using the sysfs interface, compute the kernel module list from scst.conf.
  Or, editing the SCST_MODULES variable is no longer necessary.
- When using the procfs interface, the SCST handler kernel module list is
  computed from /etc/scst.conf. The list of target driver kernel modules must
  now be configured in /etc/default/scst.

Other changes:
- scstadmin output is shown if scstadmin fails.
- Running make -C scstadmin install does no longer cause the scst script to
  be started at the next reboot - it is better to leave this as an explicit step.
- Made the error message generated if the lsb-core package has not yet been
  installed more clear.
- Use proper init script path on Slackware.
- make uninstall: run remove_initd under chroot if $(DESTDIR) is not empty.
- Fixed a bug in "make -C scstadmin uninstall": the path specified for removing
  /etc/init.d/scst was wrong.
- The command /etc/init.d/scst restart will only try to start SCST if stopping
  succeeded.
- Replaced "mkdir -m 755 -p $(DESTDIR)$(INITDIR)" by
  "install -d $(DESTDIR)$(INITDIR)" because of uniformity.

These changes have been tested on Ubuntu 11.04, Fedora 15, CentOS 5.6,
Scientific Linux 6.0, openSUSE 11.4, SLES11 SP1 and Slackware 13.37.

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3564 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-10 02:38:04 +00:00
Vladislav Bolkhovitin
bcf74cdd7b Web and docs updates
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3563 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-10 01:43:05 +00:00
Bart Van Assche
7943d6466e ib_srpt: Use a spinlock to protect ch->req_lim and ch->req_lim_delta changes instead of using atomics. Reduces the time spent in the ib_srpt_compl thread with a little bit more than 10%.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3558 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-08 18:13:30 +00:00
Bart Van Assche
aa78149881 ib_srpt: Update test instructions.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3557 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-08 18:05:44 +00:00
Vladislav Bolkhovitin
8b90327419 Modified patch from Bart Van Assche <bvanassche@acm.org> fixing errors reporting
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3552 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-07 18:08:58 +00:00
Vladislav Bolkhovitin
ed07de2ffb - Return no residual if expected values not set instead of BUG_ON(),
because this is valid situation for some preliminary comleted commands.

 - Cleanup



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3549 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-06 21:32:16 +00:00
Vladislav Bolkhovitin
2f1745eec1 Set data_out_in_data_receiving for preliminary completed commands as
well to prevent releasing them too early in iscsi_check_tm_data_wait_timeouts()



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3546 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-06 21:04:04 +00:00
Bart Van Assche
ab69b20fe2 ib_srpt: Fix a recently introduced RHEL 5 / CentOS 5 deadlock triggered by initiator logout
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3545 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-05 10:00:57 +00:00
Bart Van Assche
ce81f59468 ib_srpt: Simplify IB CM code
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3544 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-05 09:59:17 +00:00
Bart Van Assche
2ed01977da ib_srpt: Fix a spelling error
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3543 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-05 09:58:32 +00:00
Bart Van Assche
a43b1b63fc ib_srpt: Add a BUG_ON() statement
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3542 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-05 09:58:03 +00:00
Bart Van Assche
1061f1cf43 ib_srpt: Fix a recently introduced leak in an error path
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3541 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-05 09:57:35 +00:00
Bart Van Assche
8aacdf09ef ib_srpt: Remove an unused variable
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3540 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-05 09:56:58 +00:00