mirror_zfs/include
Allan Jude 7a6c12fd6a
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 <pcd@delphix.com>
Reviewed-by: Kjeld Schouten <kjeld@schouten-lebbing.nl>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Signed-off-by: Allan Jude <allan@klarasystems.com>
Closes #9616
2020-08-25 11:04:20 -07:00
..
os Import vdev ashift optimization from FreeBSD 2020-08-21 12:53:17 -07:00
sys Avoid symbol collision with in-kernel zstdlib 2020-08-24 12:20:41 -07:00
.gitignore
cityhash.h
libnvpair.h
libuutil_common.h
libuutil_impl.h
libuutil.h
libzfs_core.h
libzfs_impl.h Don't assert on nvlists larger than SPA_MAXBLOCKSIZE 2020-08-25 11:04:20 -07:00
libzfs.h Import vdev ashift optimization from FreeBSD 2020-08-21 12:53:17 -07:00
libzutil.h
Makefile.am
thread_pool.h
zfeature_common.h
zfs_comutil.h
zfs_deleg.h
zfs_fletcher.h
zfs_namecheck.h
zfs_prop.h