aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Ahrens <[email protected]>2019-02-26 11:15:28 -0800
committerBrian Behlendorf <[email protected]>2019-02-26 11:15:28 -0800
commitc568ab8d99d88b69f54159cd771cb9b20784174e (patch)
tree743b8f169a34fd17434eaeb9238b7904e1d08e27
parent47d7ef5490f06bf36bbf9667f266bfd6907ca596 (diff)
zfs.8 has wrong description of "zfs program -t"
The "-t" argument to "zfs program" specifies a limit on the number of LUA instructions that can be executed. The zfs.8 manpage has the wrong description. It should be updated to match what's in zfs-program.8 Also fix the formatting of the zfs help message. Reviewed by: Allan Jude <[email protected]> Reviewed-by: loli10K <[email protected]> Reviewed-by: George Melikov <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Matthew Ahrens <[email protected]> Closes #8410
-rw-r--r--cmd/zfs/zfs_main.c6
-rw-r--r--man/man8/zfs-program.84
-rw-r--r--man/man8/zfs.821
-rwxr-xr-xtests/zfs-tests/tests/functional/cli_root/zfs_program/zfs_program_json.ksh4
4 files changed, 19 insertions, 16 deletions
diff --git a/cmd/zfs/zfs_main.c b/cmd/zfs/zfs_main.c
index 2017c9803..12a5cf6cf 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, 2018 by Delphix. All rights reserved.
+ * Copyright (c) 2011, 2019 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.
@@ -366,8 +366,8 @@ get_usage(zfs_help_t idx)
return (gettext("\tbookmark <snapshot> <bookmark>\n"));
case HELP_CHANNEL_PROGRAM:
return (gettext("\tprogram [-jn] [-t <instruction limit>] "
- "[-m <memory limit (b)>] <pool> <program file> "
- "[lua args...]\n"));
+ "[-m <memory limit (b)>]\n"
+ "\t <pool> <program file> [lua args...]\n"));
case HELP_LOAD_KEY:
return (gettext("\tload-key [-rn] [-L <keylocation>] "
"<-a | filesystem|volume>\n"));
diff --git a/man/man8/zfs-program.8 b/man/man8/zfs-program.8
index 72a33761b..bc2c10fdc 100644
--- a/man/man8/zfs-program.8
+++ b/man/man8/zfs-program.8
@@ -8,7 +8,7 @@
.\" http://www.illumos.org/license/CDDL.
.\"
.\"
-.\" Copyright (c) 2016, 2017 by Delphix. All Rights Reserved.
+.\" Copyright (c) 2016, 2019 by Delphix. All Rights Reserved.
.\"
.Dd January 21, 2016
.Dt ZFS-PROGRAM 8
@@ -59,7 +59,7 @@ determining if changes would succeed (zfs.check.*).
Without this flag, all pending changes must be synced to disk before a
channel program can complete.
.It Fl t Ar instruction-limit
-Execution time limit, in number of Lua instructions to execute.
+Limit the number of Lua instructions to execute.
If a channel program executes more than the specified number of instructions,
it will be stopped and an error will be returned.
The default limit is 10 million instructions, and it can be set to a maximum of
diff --git a/man/man8/zfs.8 b/man/man8/zfs.8
index 4cabf23ba..b51c91daa 100644
--- a/man/man8/zfs.8
+++ b/man/man8/zfs.8
@@ -21,7 +21,7 @@
.\"
.\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright 2011 Joshua M. Clulow <[email protected]>
-.\" Copyright (c) 2011, 2017 by Delphix. All rights reserved.
+.\" Copyright (c) 2011, 2019 by Delphix. All rights reserved.
.\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
.\" Copyright (c) 2014, Joyent, Inc. All rights reserved.
.\" Copyright (c) 2014 by Adam Stevko. All rights reserved.
@@ -302,8 +302,8 @@
.Nm
.Cm program
.Op Fl jn
-.Op Fl t Ar timeout
-.Op Fl m Ar memory_limit
+.Op Fl t Ar instruction-limit
+.Op Fl m Ar memory-limit
.Ar pool script
.Op Ar arg1 No ...
.Nm
@@ -4413,8 +4413,8 @@ Display the path's inode change time as the first column of output.
.Nm
.Cm program
.Op Fl jn
-.Op Fl t Ar timeout
-.Op Fl m Ar memory_limit
+.Op Fl t Ar instruction-limit
+.Op Fl m Ar memory-limit
.Ar pool script
.Op Ar arg1 No ...
.Xc
@@ -4446,11 +4446,12 @@ The program can be used to gather information such as properties and
determining if changes would succeed (zfs.check.*).
Without this flag, all pending changes must be synced to disk before
a channel program can complete.
-.It Fl t Ar timeout
-Execution time limit, in milliseconds.
-If a channel program executes for longer than the provided timeout, it will
-be stopped and an error will be returned.
-The default timeout is 1000 ms, and can be set to a maximum of 10000 ms.
+.It Fl t Ar instruction-limit
+Limit the number of Lua instructions to execute.
+If a channel program executes more than the specified number of instructions,
+it will be stopped and an error will be returned.
+The default limit is 10 million instructions, and it can be set to a maximum of
+100 million instructions.
.It Fl m Ar memory-limit
Memory limit, in bytes.
If a channel program attempts to allocate more memory than the given limit,
diff --git a/tests/zfs-tests/tests/functional/cli_root/zfs_program/zfs_program_json.ksh b/tests/zfs-tests/tests/functional/cli_root/zfs_program/zfs_program_json.ksh
index 02fd173e1..1d769096b 100755
--- a/tests/zfs-tests/tests/functional/cli_root/zfs_program/zfs_program_json.ksh
+++ b/tests/zfs-tests/tests/functional/cli_root/zfs_program/zfs_program_json.ksh
@@ -16,6 +16,7 @@
#
# Copyright (c) 2018 Datto Inc.
+# Copyright (c) 2019 by Delphix. All rights reserved.
#
. $STF_SUITE/include/libtest.shlib
@@ -111,7 +112,8 @@ typeset -a neg_cmds=("-Z")
typeset -a neg_cmds_out=(
"invalid option 'Z'
usage:
- program [-jn] [-t <instruction limit>] [-m <memory limit (b)>] <pool> <program file> [lua args...]
+ program [-jn] [-t <instruction limit>] [-m <memory limit (b)>]
+ <pool> <program file> [lua args...]
For the property list, run: zfs set|get