X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;ds=sidebyside;f=lnet%2Flnet%2Frouter_proc.c;h=bbcc0fd91b094042cd1a8778f7ddbf0e391294be;hb=8cb7ccf54e2d34010bea9a71fe0eff708545ab78;hp=064c73a3faaabab8f848d72b9c0c02f63700a007;hpb=b11be372c21dcaa7a6e16f65cf4dd226ea39cadb;p=fs%2Flustre-release.git diff --git a/lnet/lnet/router_proc.c b/lnet/lnet/router_proc.c index 064c73a..bbcc0fd 100644 --- a/lnet/lnet/router_proc.c +++ b/lnet/lnet/router_proc.c @@ -3,7 +3,7 @@ * * Copyright (c) 2011, 2017, Intel Corporation. * - * This file is part of Lustre, https://wiki.hpdd.intel.com/ + * This file is part of Lustre, https://wiki.whamcloud.com/ * * Portals is free software; you can redistribute it and/or * modify it under the terms of version 2 of the GNU General Public @@ -24,7 +24,6 @@ #include -#include #include #include @@ -83,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 */ @@ -105,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", - ctrs->msgs_alloc, ctrs->msgs_max, - ctrs->errors, - ctrs->send_count, ctrs->recv_count, - ctrs->route_count, ctrs->drop_count, - ctrs->send_length, ctrs->recv_length, - ctrs->route_length, ctrs->drop_length); + common.lcc_msgs_alloc, common.lcc_msgs_max, + common.lcc_errors, + common.lcc_send_count, common.lcc_recv_count, + common.lcc_route_count, common.lcc_drop_count, + common.lcc_send_length, common.lcc_recv_length, + common.lcc_route_length, common.lcc_drop_length); if (pos >= min_t(int, len, strlen(tmpstr))) rc = 0; @@ -877,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); @@ -951,10 +952,15 @@ static struct ctl_table lnet_table[] = { .mode = 0644, .proc_handler = &proc_lnet_portal_rotor, }, - { 0 } + { .procname = NULL } }; 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); }