summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
60c6d85)
echo_client registers obd type and then initializes kmem cache, this is
problematic because echo_key will be immidiately accessed after obd type
is registered. This will cause kernel fault.
Also, an awk problem is fixed. If the length of output buffer is longer
than 1024 bytes, awk will run into problem.
Change-Id: Ief287e8f4eeb6a39bc336e7a9f5c21e921b79a58
Signed-off-by: Jinshan Xiong <jay@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1521
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
int rc;
lprocfs_echo_init_vars(&lvars);
int rc;
lprocfs_echo_init_vars(&lvars);
- rc = class_register_type(&echo_obd_ops, NULL, lvars.module_vars,
- LUSTRE_ECHO_CLIENT_NAME, &echo_device_type);
+
+ rc = lu_kmem_init(echo_caches);
- lu_kmem_init(echo_caches);
+ rc = class_register_type(&echo_obd_ops, NULL,
+ lvars.module_vars,
+ LUSTRE_ECHO_CLIENT_NAME,
+ &echo_device_type);
+ if (rc)
+ lu_kmem_fini(echo_caches);
+
fi
local osc=$($LCTL dl | grep -v mdt | awk '$3 == "osc" {print $4; exit}')
fi
local osc=$($LCTL dl | grep -v mdt | awk '$3 == "osc" {print $4; exit}')
- local host=$(awk '/current_connection:/ {print $2}' /proc/fs/lustre/osc/$osc/import)
- local target=$(awk '/target:/ {print $2}' /proc/fs/lustre/osc/$osc/import)
+ local host=$(lctl get_param -n osc.$osc.import |
+ awk '/current_connection:/ {print $2}' )
+ local target=$(lctl get_param -n osc.$osc.import |
+ awk '/target:/ {print $2}' )
target=${target%_UUID}
[[ -n $target ]] && { setup_obdecho_osc $host $target || rc=1; } || rc=1
target=${target%_UUID}
[[ -n $target ]] && { setup_obdecho_osc $host $target || rc=1; } || rc=1