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-5844 get rid of IOC_LIBCFS_MEMHOG and IOC_LIBCFS_PANIC ioctls
[fs/lustre-release.git]
/
lnet
/
utils
/
portals.c
diff --git
a/lnet/utils/portals.c
b/lnet/utils/portals.c
index
8778f81
..
ab3f9f7
100644
(file)
--- a/
lnet/utils/portals.c
+++ b/
lnet/utils/portals.c
@@
-1063,7
+1063,7
@@
jt_ptl_add_route (int argc, char **argv)
{
struct lnet_ioctl_config_data data;
lnet_nid_t gateway_nid;
-
unsigned int hops = 1
;
+
__u32 hops = LNET_UNDEFINED_HOPS
;
unsigned int priority = 0;
char *end;
int rc;
@@
-1084,8
+1084,9
@@
jt_ptl_add_route (int argc, char **argv)
}
if (argc > 2) {
- hops = strtoul(argv[2], &end, 0);
- if (hops == 0 || hops >= 256 || (end != NULL && *end != 0)) {
+ hops = strtol(argv[2], &end, 0);
+ if (hops == 0 || hops >= 256 ||
+ (end != NULL && *end != 0)) {
fprintf(stderr, "Can't parse hopcount \"%s\"\n",
argv[2]);
return -1;
@@
-1681,49
+1682,6
@@
get_cycles_per_usec ()
return (1000.0);
}
-int jt_ptl_memhog(int argc, char **argv)
-{
- static int gfp = 0; /* sticky! */
-
- struct libcfs_ioctl_data data;
- int rc;
- int count;
- char *end;
-
- if (argc < 2) {
- fprintf(stderr, "usage: %s <npages> [<GFP flags>]\n", argv[0]);
- return 0;
- }
-
- count = strtol(argv[1], &end, 0);
- if (count < 0 || *end != 0) {
- fprintf(stderr, "Can't parse page count '%s'\n", argv[1]);
- return -1;
- }
-
- if (argc >= 3) {
- rc = strtol(argv[2], &end, 0);
- if (*end != 0) {
- fprintf(stderr, "Can't parse gfp flags '%s'\n", argv[2]);
- return -1;
- }
- gfp = rc;
- }
-
- LIBCFS_IOC_INIT(data);
- data.ioc_count = count;
- data.ioc_flags = gfp;
- rc = l_ioctl(LNET_DEV_ID, IOC_LIBCFS_MEMHOG, &data);
-
- if (rc != 0) {
- fprintf(stderr, "memhog %d failed: %s\n", count, strerror(errno));
- return -1;
- }
-
- printf("memhog %d OK\n", count);
- return 0;
-}
-
int jt_ptl_testprotocompat(int argc, char **argv)
{
struct libcfs_ioctl_data data;