From 14c82f892dc97cc43427770c2fae86786461db5c Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Tue, 28 Jul 2015 15:28:59 +0000 Subject: [PATCH] /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"