From bc070bc1bcdf7114ddb695028d19e14cf9a7872e Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Tue, 28 Jul 2015 05:38:07 +0000 Subject: [PATCH 1/6] scripts/specialize-patch: Handle #if 0 / #elif statement combinations correctly git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6431 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scripts/specialize-patch | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/scripts/specialize-patch b/scripts/specialize-patch index aee6563e8..55cd4f51f 100755 --- a/scripts/specialize-patch +++ b/scripts/specialize-patch @@ -346,6 +346,15 @@ function process_preprocessor_statement(evaluated, condition) { } else if (evaluated ~ "^+#elif") { + matching_if = if_stmnt[if_nesting_level] + if (debug) + printf "/* debug specialize-patch: (g0a) %s: matching_if = %s */\n", \ + evaluated, matching_if + if (if_discarded[if_nesting_level]) { + sub("^+#elif", "+#if", input_line[0]) + if (debug) + printf "/* debug specialize-patch: (g0b) -> %s */\n", evaluated + } evaluated = handle_if(evaluated) } else if (evaluated ~ "^+#else") @@ -436,6 +445,9 @@ function process_preprocessor_statement(evaluated, condition) { if (lines >= 1 && line[lines - 1] == "+") delete_next_blank_line = 1 } + + if (evaluated ~ "^+#if") + if_discarded[if_nesting_level] = discard } function reset_hunk_state_variables() { From 14c82f892dc97cc43427770c2fae86786461db5c Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Tue, 28 Jul 2015 15:28:59 +0000 Subject: [PATCH 2/6] /etc/init.d/scst: Fix stopping SCST with iSER loaded Commit r6420 broke scst unloading, since isert_scst must be unloaded before iscsi_scst. Additionally, fix another possible cause of failing to unload isert_scst. With iSER (RDMA CM to be exact) it may take up to about 50 seconds to receive disconnected event if the remote end is for some reason unreachable, e.g. becauase of a cable problem or power loss/forced reboot on initiator side. This is due to MAD send timeout. Signed-off-by: Yan Burman [bvanassche: modified this patch such that it uses unload_kmod()] git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6432 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scstadmin/init.d/scst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scstadmin/init.d/scst b/scstadmin/init.d/scst index 2c33606e2..6c45745b8 100755 --- a/scstadmin/init.d/scst +++ b/scstadmin/init.d/scst @@ -185,6 +185,12 @@ unload_scst() { killproc $d done + # isert_scst must be unloaded before iscsi_scst. Note that unloading + # isert_scst may take a while since in certain scenarios (e.g. cable + # problem and then service stop) MADs get timed out only after about 50+ + # seconds. + unload_kmod isert_scst 90 || echo "Unloading isert_scst failed" + reverse_list="" for m in $SCST_MODULES; do reverse_list="$m $reverse_list" From 69ff2ed9289616a134c13f96b517d44508d01c8b Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Tue, 28 Jul 2015 15:40:12 +0000 Subject: [PATCH 3/6] ib_srpt: Clarify RoCE documentation This is a modified version of a patch supplied by Hiroyuki Sato git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6433 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- srpt/README | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/srpt/README b/srpt/README index 85f9b91c3..5f33a5a82 100644 --- a/srpt/README +++ b/srpt/README @@ -85,12 +85,11 @@ The ib_srpt kernel module supports the following parameters: Configuring the SRP Target System --------------------------------- -The first step is to choose whether access control will be controlled per -HCA or per HCA port and to create a modprobe configuration file that reflects -this choice. An example: +When using RoCE or iWARP the first step is to enable support for these +protocols in the target driver by setting the rdma_cm_port kernel module +parameter to a non-zero value. An example: - # cat /etc/modprobe.d/ib_srpt.conf - options ib_srpt one_target_per_port=1 + echo options ib_srpt rdma_cm_port=5000 > /etc/modprobe.d/ib_srpt.conf Next, create the file /etc/scst.conf. You can create this file with the scstadmin tool as follows: From b9f3fdb66b3ec6b556bfffc092fb84972c90fafb Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Tue, 28 Jul 2015 15:46:29 +0000 Subject: [PATCH 4/6] ib_srpt: Correct a regular expression in the README Based on a patch from Hiroyuki Sato . git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6434 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- srpt/README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srpt/README b/srpt/README index 5f33a5a82..1380cf354 100644 --- a/srpt/README +++ b/srpt/README @@ -151,7 +151,7 @@ When using RoCE or iWARP, log in to the target system to determine the id_ext and ioc_guid parameters and use these to log in. An example: [ target system ] - # sed 's/,\(pkey\|dgid\|service_id\)=[^,]*//g' $(find /sys/kernel/scst_tgt/targets/ib_srpt -name login_info) | uniq + # sed 's/tid_ext=/id_ext=/;s/,\(pkey\|dgid\|service_id\)=[^,]*//g' $(find /sys/kernel/scst_tgt/targets/ib_srpt -name login_info) | uniq id_ext=0002c90300a34270,ioc_guid=0002c90300a34270 [ initiator system ] From 058ad7ac91bbb10da5422cde997ee52fa5dd48d7 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Wed, 29 Jul 2015 17:14:28 +0000 Subject: [PATCH 5/6] nightly build: Update kernel versions git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6435 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- nightly/conf/nightly.conf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nightly/conf/nightly.conf b/nightly/conf/nightly.conf index 45af7ed63..1e4eaeb16 100644 --- a/nightly/conf/nightly.conf +++ b/nightly/conf/nightly.conf @@ -3,10 +3,10 @@ ABT_DETAILS="x86_64" ABT_JOBS=5 ABT_KERNELS=" \ -4.1.2 \ -4.0.8-nc \ +4.1.3 \ +4.0.9-nc \ 3.19.7-nc \ -3.18.8-nc \ +3.18.19-nc \ 3.17.8-nc \ 3.16.7-nc \ 3.15.10-nc \ From 06ef46415cd7fbd96397b76dc34dfcff0772c2f5 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Wed, 29 Jul 2015 17:20:43 +0000 Subject: [PATCH 6/6] /etc/init.d/scst: Suppress an error message if iscsi-scstd is not installed Avoid that the following error message is printed when stopping or starting SCST if iscsi-scstd has not been installed: # /sbin/service scst restart which: no iscsi-scstd in (/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/sbin:/usr/local/bin) Restarting SCST Signed-off-by: Hiroyuki Sato [bvanassche: Eliminated ISCSI_DAEMON variable] git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6436 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scstadmin/init.d/scst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scstadmin/init.d/scst b/scstadmin/init.d/scst index 6c45745b8..ba5ce6f19 100755 --- a/scstadmin/init.d/scst +++ b/scstadmin/init.d/scst @@ -79,7 +79,6 @@ fi cat <<"EOF" SCST_CFG=/etc/scst.conf -ISCSI_DAEMON="$(which iscsi-scstd)" show_status() { _rc_status_ret=$? @@ -160,7 +159,7 @@ parse_scst_conf() { SCST_OPT_MODULES="crc32c-intel $SCST_OPT_MODULES";; esac SCST_OPT_MODULES="crc32c isert_scst $SCST_OPT_MODULES" - SCST_DAEMONS="${ISCSI_DAEMON} $SCST_DAEMONS" + SCST_DAEMONS="$(which iscsi-scstd) $SCST_DAEMONS" fi }