aboutsummaryrefslogtreecommitdiffstats
path: root/module/os/linux/zfs
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2021-02-24 09:57:18 -0800
committerGitHub <[email protected]>2021-02-24 09:57:18 -0800
commit1dfc82a14ed538992f5c37a152995e93ede10469 (patch)
treef556c215fedef12cc050067a6d7614cd0ff076ee /module/os/linux/zfs
parentf01eaed4556623b63c414fee9085ae27d457fe46 (diff)
Linux: increase max nvlist_src size
On Linux increase the maximum allowed size of the src nvlist which can be passed to the /dev/zfs ioctl. Originally, this was set to a maximum of KMALLOC_MAX_SIZE (4M) because it was kmalloc'd. Since that time it's been converted to a vmalloc so that's no longer a hard limit, and it's desirable for `zfs send/recv` to allow larger nvlists so more snapshots can be sent at once. Signed-off-by: Brian Behlendorf <[email protected]> Closes #6572 Closes #11638
Diffstat (limited to 'module/os/linux/zfs')
-rw-r--r--module/os/linux/zfs/zfs_ioctl_os.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/module/os/linux/zfs/zfs_ioctl_os.c b/module/os/linux/zfs/zfs_ioctl_os.c
index b88e0497d..6f5cff177 100644
--- a/module/os/linux/zfs/zfs_ioctl_os.c
+++ b/module/os/linux/zfs/zfs_ioctl_os.c
@@ -209,7 +209,7 @@ zfs_max_nvlist_src_size_os(void)
if (zfs_max_nvlist_src_size != 0)
return (zfs_max_nvlist_src_size);
- return (KMALLOC_MAX_SIZE);
+ return (MIN(ptob(zfs_totalram_pages) / 4, 128 * 1024 * 1024));
}
void