summaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorJohn Gallagher <[email protected]>2018-06-15 15:10:42 -0700
committerBrian Behlendorf <[email protected]>2018-06-15 15:10:42 -0700
commit917f475fba03ceb4e11c7aa35aff09c47a6c596e (patch)
tree92ce7d3981d5ca93e1bbcb42665e9ecc3e1ed1ed /cmd
parent7b98f0d91f09df90218322df5cf1b8ba7928972e (diff)
Add tunables for channel programs
This patch adds tunables for modifying the maximum memory limit and maximum instruction limit that can be specified when running a channel program. Reviewed-by: Matthew Ahrens <[email protected]> Reviewed-by: Brian Behlendorf <[email protected] Reviewed-by: Sara Hartse <[email protected]> Signed-off-by: John Gallagher <[email protected]> External-issue: LX-1085 Closes #7618
Diffstat (limited to 'cmd')
-rw-r--r--cmd/zfs/zfs_main.c20
1 files changed, 3 insertions, 17 deletions
diff --git a/cmd/zfs/zfs_main.c b/cmd/zfs/zfs_main.c
index b45e93c3f..e60ac514d 100644
--- a/cmd/zfs/zfs_main.c
+++ b/cmd/zfs/zfs_main.c
@@ -21,7 +21,7 @@
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2011, 2017 by Delphix. All rights reserved.
+ * Copyright (c) 2011, 2018 by Delphix. All rights reserved.
* Copyright 2012 Milan Jurik. All rights reserved.
* Copyright (c) 2012, Joyent, Inc. All rights reserved.
* Copyright (c) 2013 Steven Hartland. All rights reserved.
@@ -7308,24 +7308,10 @@ zfs_do_channel_program(int argc, char **argv)
}
if (c == 't') {
- if (arg > ZCP_MAX_INSTRLIMIT || arg == 0) {
- (void) fprintf(stderr, gettext(
- "Invalid instruction limit: "
- "%s\n"), optarg);
- return (1);
- } else {
- instrlimit = arg;
- }
+ instrlimit = arg;
} else {
ASSERT3U(c, ==, 'm');
- if (arg > ZCP_MAX_MEMLIMIT || arg == 0) {
- (void) fprintf(stderr, gettext(
- "Invalid memory limit: "
- "%s\n"), optarg);
- return (1);
- } else {
- memlimit = arg;
- }
+ memlimit = arg;
}
break;
}