From 5bc29ef86f38f761d3dc31d5f64253e0f17147b0 Mon Sep 17 00:00:00 2001 From: adilger Date: Tue, 12 Apr 2005 08:59:24 +0000 Subject: [PATCH] Branch: b1_4 Try to unload ksocknal/kqswnal/kptlrouter for environments that auto-load these modules because of modules.conf (e.g. mdev). --- lustre/utils/lconf | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/lustre/utils/lconf b/lustre/utils/lconf index e63bde1..9b2bc22 100755 --- a/lustre/utils/lconf +++ b/lustre/utils/lconf @@ -1181,9 +1181,21 @@ class kmod: for src_dir, dev_dir, mod in rev: if not mod_loaded(mod) and not config.noexec: continue - # debug hack - if mod == 'portals' and config.dump: - lctl.dump(config.dump) + if mod == 'portals': + if not config.noexec: + # handle modules loaded automatically, but not in config + if mod_loaded("ksocknal"): + log('try unloading module: ksocknal') + (rc, out) = run('/sbin/rmmod ksocknal') + if mod_loaded("kqswnal"): + log('try unloading module: kqswnal') + (rc, out) = run('/sbin/rmmod kqswnal') + if mod_loaded("kptlrouter"): + log('try unloading module: kptlrouter') + (rc, out) = run('/sbin/rmmod kptlrouter') + if config.dump: + # debug hack + lctl.dump(config.dump) log('unloading module:', mod) (rc, out) = run('/sbin/rmmod', mod) if rc: -- 1.8.3.1