Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
LU-11986 lnet: properly cleanup lnet debugfs files
[fs/lustre-release.git]
/
lnet
/
lnet
/
router_proc.c
diff --git
a/lnet/lnet/router_proc.c
b/lnet/lnet/router_proc.c
index
b4e4d7b
..
bbcc0fd
100644
(file)
--- a/
lnet/lnet/router_proc.c
+++ b/
lnet/lnet/router_proc.c
@@
-82,6
+82,7
@@
static int __proc_lnet_stats(void *data, int write,
{
int rc;
struct lnet_counters *ctrs;
+ struct lnet_counters_common common;
int len;
char *tmpstr;
const int tmpsiz = 256; /* 7 %u and 4 __u64 */
@@
-104,16
+105,17
@@
static int __proc_lnet_stats(void *data, int write,
}
lnet_counters_get(ctrs);
+ common = ctrs->lct_common;
len = snprintf(tmpstr, tmpsiz,
"%u %u %u %u %u %u %u %llu %llu "
"%llu %llu",
- c
trs->msgs_alloc, ctrs->
msgs_max,
- c
trs->
errors,
- c
trs->send_count, ctrs->
recv_count,
- c
trs->route_count, ctrs->
drop_count,
- c
trs->send_length, ctrs->
recv_length,
- c
trs->route_length, ctrs->
drop_length);
+ c
ommon.lcc_msgs_alloc, common.lcc_
msgs_max,
+ c
ommon.lcc_
errors,
+ c
ommon.lcc_send_count, common.lcc_
recv_count,
+ c
ommon.lcc_route_count, common.lcc_
drop_count,
+ c
ommon.lcc_send_length, common.lcc_
recv_length,
+ c
ommon.lcc_route_length, common.lcc_
drop_length);
if (pos >= min_t(int, len, strlen(tmpstr)))
rc = 0;
@@
-876,7
+878,7
@@
static int __proc_lnet_portal_rotor(void *data, int write,
if (rc < 0)
goto out;
- tmp =
cfs_trimwhite
(buf);
+ tmp =
strim
(buf);
rc = -EINVAL;
lnet_res_lock(0);
@@
-955,5
+957,10
@@
static struct ctl_table lnet_table[] = {
void lnet_router_debugfs_init(void)
{
- lnet_insert_debugfs(lnet_table, NULL);
+ lnet_insert_debugfs(lnet_table);
+}
+
+void lnet_router_debugfs_fini(void)
+{
+ lnet_remove_debugfs(lnet_table);
}