Commit Graph

3083 Commits

Author SHA1 Message Date
Vladislav Bolkhovitin
c83af071b6 Looks like current kernels are more fair, so we can try to increase SCST_MAX_TGT_DEV_COMMANDS to please QD hungry initiators
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4154 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-03-05 21:21:22 +00:00
Bart Van Assche
87dd12ac73 scstadmin: Suggest the user to use systemctl (systemd) instead of the LSB installation script if available
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4153 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-03-04 14:17:53 +00:00
Bart Van Assche
3da8048c71 scstadmin: Only enable /etc/init.d/scst in runlevels 3 and 5 since networking is not available in runlevels 2 or 4
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4152 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-03-04 14:16:51 +00:00
Bart Van Assche
02b431ec24 scstadmin: Revert r4023 since bug https://bugzilla.novell.com/show_bug.cgi?id=738281 has been fixed
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4151 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-03-04 14:13:52 +00:00
Bart Van Assche
b07403a23d ib_srpt: Remove an obsolete patch
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4150 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-03-04 13:16:27 +00:00
Vladislav Bolkhovitin
e83c2ebe66 Gentoo HOWTO written by Jurie Botha <jurieb@taprojects.co.za>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4149 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-03-02 02:58:57 +00:00
Vladislav Bolkhovitin
6f228ecb71 Correct misleading SCST_CMD_ABORTED description.
Noticed by Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4148 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-02-27 22:59:10 +00:00
Bart Van Assche
30615c003c ib_srpt: Clarify a comment
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4147 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-02-25 08:59:13 +00:00
Bart Van Assche
2553057f73 ib_srpt: Disallow new logins during module removal
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4146 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-02-25 08:58:50 +00:00
Bart Van Assche
2d12dae7b4 ib_srpt: Whitespace-only change
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4145 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-02-24 07:21:24 +00:00
Bart Van Assche
c4d91e67d9 ib_srpt: Follow-up for r4143
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4144 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-02-24 07:20:52 +00:00
Vladislav Bolkhovitin
50120c37b3 scst_cmd_aborted() is a bad and ambiguous name. Rename it to scst_cmd_aborted_on_xmit() and create a new version, which truly reflects its semantic.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4143 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-02-24 02:24:06 +00:00
Bart Van Assche
5160ddb148 nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4142 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-02-19 08:32:26 +00:00
Bart Van Assche
440e1a405e ib_srpt: Document LUN masking
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4141 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-02-18 13:32:45 +00:00
Bart Van Assche
6e55334a9f ib_srpt: Fix QP use-after-free triggered by SRP logout.
Fixed this by destroying cm_id before QP instead of after. The following
messages were logged if the use-after-free occurred:

mlx4_core 0000:08:00.0: command 0x19 failed: fw status = 0x9
ib_srpt: ***ERROR***: srpt_init_ch_qp() failed (-9)
ib_srpt: ***ERROR***: rejected SRP_LOGIN_REQ because creating a new RDMA channel failed.
ib_srpt: Rejecting login with reason 0x10001


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4139 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-02-18 10:24:25 +00:00
Bart Van Assche
1a6c43b1bc ib_srpt: Revert r4123
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4138 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-02-18 07:03:41 +00:00
Vladislav Bolkhovitin
f2387d7956 Convert strict_strtoul() and simple_strtoul() into kstrtoul() or sscanf()
Recent versions of the checkpatch script complain about strict_strtoul()
and simple_strtoul(), so convert calls to these functions into a call to
kstrtoul() or sscanf(). Convert loops that scan for the
next-(non-)whitespace character into a call to scst_get_next_lexem().
Make __scst_process_luns_mgmt_store() a little more strict by checking
for extraneous parameters past the last argument. Fix the value "res"
returned for the SCST_TRACE_ACTION_VALUE processing code.

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4137 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-02-18 03:01:43 +00:00
Vladislav Bolkhovitin
9367254fba Patch from Vladimir Shveidel <vladimir.shveidel@xtremio.com> removing excessive msleep() in term exchange path
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4136 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-02-17 21:50:34 +00:00
Vladislav Bolkhovitin
2d31b116b1 Eliminate double req_q_cnt checks for cases when there is enough head room.
Signed-off-by: Chetan Loke <loke.chetan@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4135 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-02-17 02:14:28 +00:00
Vladislav Bolkhovitin
ab25cb45dc Micro-optimize scst_calc_block_shift()
Replace a loop by a single instruction, namely bsr (bit scan reverse).
From the disassembler output of scst_calc_block_shift() on an x86_64
system:

   0x0000000000001493 <+35>:    bsr    %edx,%ecx

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4134 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-02-17 01:43:21 +00:00
Vladislav Bolkhovitin
659e6ea6e8 Install man pages as well. Noticed by Bart Van Assche <bvanassche@acm.org>.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4133 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-02-17 01:38:16 +00:00
Bart Van Assche
5eb3a85948 scst/src/scst_lib.c: Remove a trailing whitespace
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4132 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-02-16 10:27:18 +00:00
Vladislav Bolkhovitin
293c2f3abd Slightly modified patch from Bart Van Assche <bvanassche@acm.org> cleaning VERIFY commands processing
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4131 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-02-15 22:32:05 +00:00
Bart Van Assche
448a7bdd29 scstadmin: Replace scstadmin/scstadmin by a soft link if it is a regular file. This is a workaround for a bug in the "Download tarball" functionality of the SourceForge website
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4129 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-02-15 10:02:06 +00:00
Bart Van Assche
dfaf6388f2 ib_srpt: Display the qpn when QP initialization fails
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4128 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-02-14 19:48:07 +00:00
Vladislav Bolkhovitin
c9b149c5ce Let's stay on the safe side away from gcc bugs and separate ints and bitfields with another access rules
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4127 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-02-13 22:35:52 +00:00
Bart Van Assche
fab05915ad ib_srpt: Reset a QP before transitioning it to the INIT state. That
should avoid that an error message like the following is generated if
driver and HCA QP state get out of sync:

mlx4_core 0000:03:00.0: command 0x19 failed: fw status = 0x9


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4123 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-02-13 17:06:50 +00:00
Bart Van Assche
a5a4d5ca6c ib_srpt: Increase RDMA_COMPL_TIMEOUT_S in order to avoid that the IB completion timeout fires too early on flaky motherboards
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4122 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-02-11 10:29:22 +00:00
Bart Van Assche
13e3b5265c Remove scripts/generate-kernel-with-srp-patches since all code in it is now upstream
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4121 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-02-11 10:25:55 +00:00
Bart Van Assche
f2c201ee09 Add scripts/generate-scst-patch, which is based on a script posted on scst-devel by Chetan Loke
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4120 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-02-11 10:23:59 +00:00
Vladislav Bolkhovitin
37cbdb03df Minor docs update based on experience of Rommer <rommer@active.by>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4119 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-02-11 03:01:00 +00:00
Vladislav Bolkhovitin
6a34f10d81 Cleanup suggested by Bart Van Assche <bvanassche@acm.org>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4118 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-02-10 02:12:15 +00:00
Bart Van Assche
47134aad53 nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4117 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-02-09 11:53:31 +00:00
Vladislav Bolkhovitin
3f6ecca6ff Docs clarification
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4116 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-02-08 19:08:53 +00:00
Bart Van Assche
25ccc656d9 rebuild-rhel-kernel-rpm: Pass %_topdir to all rpm commands, just to be sure.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4115 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-02-05 20:28:38 +00:00
Bart Van Assche
3f2b4e531c scripts/rebuild-rhel-kernel-rpm: Update CentOS SRPM URLs and use rpmbuild --define instead of modifying $HOME/.rpmmacros.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4114 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-02-05 19:30:37 +00:00
Bart Van Assche
8d8d45f0bf nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4113 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-02-05 10:54:30 +00:00
Bart Van Assche
f944799e42 iscsi-scst: Port to RHEL 5.7
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4112 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-02-04 16:41:21 +00:00
Bart Van Assche
c31ac7c591 scst: Port to RHEL 5.7
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4111 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-02-04 16:40:33 +00:00
Bart Van Assche
85b89521f8 iscsi-scstd: Make really sure that the buffer allocated for nl_read() is large enough
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4110 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-02-04 16:39:26 +00:00
Bart Van Assche
fdeea7c916 iscsi-scstd: Follow-up for r4077 - avoid that reading from the netlink socket can cause data corruption
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4109 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-02-04 12:39:26 +00:00
Bart Van Assche
62dd759208 fcst: Transform r4107 into something that makes sense
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4108 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-02-03 09:13:00 +00:00
Bart Van Assche
1d17e6386c fcst: Follow-up for r4106 - make fcst build again on kernel 3.0 and before
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4107 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-02-02 19:24:05 +00:00
Bart Van Assche
b6e5aa684c Source: http://marc.info/?l=linux-scsi&m=132812597504750
From: "Paul E. McKenney" <paul.mckenney@linaro.org>

The call_rcu() in ft_tport_delete() invokes ft_tport_rcu_free(),
which just does a kfree().  So convert the call_rcu() to kfree_rcu(),
allowing ft_tport_rcu_free() to be eliminated.

Signed-off-by: Paul E. McKenney <paul.mckenney@linaro.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: "Nicholas A. Bellinger" <nab@linux-iscsi.org>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Jesper Juhl <jj@chaosbits.net>
Cc: linux-scsi@vger.kernel.org
Cc: target-devel@vger.kernel.org
---
 drivers/target/tcm_fc/tfc_sess.c |   12 +-----------
 1 files changed, 1 insertions(+), 11 deletions(-)

diff --git a/drivers/target/tcm_fc/tfc_sess.c b/drivers/target/tcm_fc/tfc_sess.c
index 4c0507c..eff512b 100644
--- a/drivers/target/tcm_fc/tfc_sess.c
+++ b/drivers/target/tcm_fc/tfc_sess.c
@@ -86,16 +86,6 @@ static struct ft_tport *ft_tport_create(struct fc_lport *lport)
 }
 
 /*
- * Free tport via RCU.
- */
-static void ft_tport_rcu_free(struct rcu_head *rcu)
-{
-	struct ft_tport *tport = container_of(rcu, struct ft_tport, rcu);
-
-	kfree(tport);
-}
-
-/*
  * Delete a target local port.
  * Caller holds ft_lport_lock.
  */
@@ -114,7 +104,7 @@ static void ft_tport_delete(struct ft_tport *tport)
 		tpg->tport = NULL;
 		tport->tpg = NULL;
 	}
-	call_rcu(&tport->rcu, ft_tport_rcu_free);
+	kfree_rcu(tport, rcu);
 }
 
 /*
-- 
1.7.8


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4106 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-02-02 19:11:33 +00:00
Vladislav Bolkhovitin
3320da76c5 Version updated to 2.2.0
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4105 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-01-26 05:48:19 +00:00
Vladislav Bolkhovitin
a8b47304a1 Update for 2.2.0 release
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4104 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-01-26 05:43:48 +00:00
Vladislav Bolkhovitin
167a7bafa5 Fix race for sess between q2t_del_sess_work_fn() and q2t_clear_tgt_db() as well as other similar places
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4101 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-01-26 05:00:28 +00:00
Vladislav Bolkhovitin
40ff4978ab IRQ handlers can be called without IRQs disabled and IRQF_DISABLED
doesn't work with IRQF_SHARED on modern kernels.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4100 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-01-26 04:59:39 +00:00
Vladislav Bolkhovitin
05f29dd542 Fix compilation for SuSe 2.6.32.46 kernel
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4099 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-01-26 04:58:36 +00:00
Bart Van Assche
c3fb0dd2b9 nightly build: Include scst_proc.c only if necessary
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4090 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-01-23 15:15:52 +00:00