aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAllan Jude <[email protected]>2020-08-25 14:04:20 -0400
committerGitHub <[email protected]>2020-08-25 11:04:20 -0700
commit7a6c12fd6a756af5a2f664c0a6a292d22fbb2487 (patch)
tree844487cbffd8fc7165b8756b97ff830ff47b1957 /include
parent87688b686bb4ede154d502cf9a342126c25789c0 (diff)
Don't assert on nvlists larger than SPA_MAXBLOCKSIZE
Originally we asserted that all reads are less than SPA_MAXBLOCKSIZE However, nvlists are not ZFS records, and are not limited to SPA_MAXBLOCKSIZE. Add a new environment variable, ZFS_SENDRECV_MAX_NVLIST, to allow the user to specify the maximum size of the nvlist that can be sent or received. Default value: 4 * SPA_MAXBLOCKSIZE (64 MB) Modify libzfs send routines to return a useful error if the send stream will generate an nvlist that is beyond the maximum size. Modify libzfs recv routines to add an explicit error message if the nvlist is too large, rather than abort()ing. Move the change the assert() to only trigger on data records Reviewed-by: Paul Dagnelie <[email protected]> Reviewed-by: Kjeld Schouten <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Matthew Ahrens <[email protected]> Signed-off-by: Allan Jude <[email protected]> Closes #9616
Diffstat (limited to 'include')
-rw-r--r--include/libzfs_impl.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/libzfs_impl.h b/include/libzfs_impl.h
index 0f1116797..26e042964 100644
--- a/include/libzfs_impl.h
+++ b/include/libzfs_impl.h
@@ -71,6 +71,7 @@ struct libzfs_handle {
char libzfs_chassis_id[256];
boolean_t libzfs_prop_debug;
regex_t libzfs_urire;
+ uint64_t libzfs_max_nvlist;
};
struct zfs_handle {