summaryrefslogtreecommitdiffstats
path: root/man/man5/zfs-module-parameters.5
diff options
context:
space:
mode:
authorRyan Moeller <[email protected]>2020-08-18 12:33:55 -0400
committerGitHub <[email protected]>2020-08-18 09:33:55 -0700
commit009cc8e884a84aeebed612ab64c30f77eab38392 (patch)
tree90543c65a111b81e7f0b8e64e6544ccfb853203b /man/man5/zfs-module-parameters.5
parent663a070c92b365262f674d1b443d3749d75d7493 (diff)
Make zc_nvlist_src_size limit tunable
We limit the size of nvlists passed to the kernel so a user cannot make the kernel do an unreasonably large allocation. On FreeBSD this limit was 128 kiB, which turns out to be a bit too small when doing some operations involving a large number of datasets or snapshots, for example replication. Make this limit tunable, with a platform-specific auto default. Linux keeps its limit at KMALLOC_MAX_SIZE. FreeBSD uses 1/4 of the system limit on user wired memory, which allows it to scale depending on system configuration. Reviewed-by: Matt Macy <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ryan Moeller <[email protected]> Issue #6572 Closes #10706
Diffstat (limited to 'man/man5/zfs-module-parameters.5')
-rw-r--r--man/man5/zfs-module-parameters.517
1 files changed, 17 insertions, 0 deletions
diff --git a/man/man5/zfs-module-parameters.5 b/man/man5/zfs-module-parameters.5
index c209acbe1..463e51acc 100644
--- a/man/man5/zfs-module-parameters.5
+++ b/man/man5/zfs-module-parameters.5
@@ -1077,6 +1077,23 @@ Default value: \fB0\fR
.sp
.ne 2
.na
+\fBzfs_max_nvlist_src_size\fR (ulong)
+.ad
+.RS 12n
+Maximum size in bytes allowed to be passed as zc_nvlist_src_size for ioctls on
+/dev/zfs. This prevents a user from causing the kernel to allocate an excessive
+amount of memory. When the limit is exceeded, the ioctl fails with EINVAL and a
+description of the error is sent to the zfs-dbgmsg log. This parameter should
+not need to be touched under normal circumstances. On FreeBSD, the default is
+based on the system limit on user wired memory. On Linux, the default is
+\fBKMALLOC_MAX_SIZE\fR .
+.sp
+Default value: \fB0\fR (kernel decides)
+.RE
+
+.sp
+.ne 2
+.na
\fBzfs_multilist_num_sublists\fR (int)
.ad
.RS 12n