mirror_zfs/cmd
Matthew Ahrens 435dc4baab Assertion failure when logging large output of channel program
The output of ZFS channel programs is logged on-disk in the zpool
history, and printed by `zpool history -i`.  Channel programs can use
10MB of memory by default, and up to 100MB by using the `zfs program -m`
flag.  Therefore their output can be up to some fraction of 100MB.

In addition to being somewhat wasteful of the limited space reserved for
the pool history (which for large pools is 1GB), in extreme cases this
can result in a failure of `ASSERT(length <= DMU_MAX_ACCESS);` in
`dmu_buf_hold_array_by_dnode()`.

This commit limits the output size that will be logged to 1MB.  Larger
outputs will not be logged, instead a entry will be logged indicating
the size of the omitted output.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Matthew Ahrens <mahrens@delphix.com>
Closes #11194
2020-11-14 10:51:21 -08:00
..
arc_summary Replace ZFS on Linux references with OpenZFS 2020-10-16 13:01:24 -07:00
arcstat arcstat: Add -a and -p options from FreeNAS 2020-10-30 16:02:11 -07:00
dbufstat Make dbufstat work on FreeBSD 2020-10-16 13:00:28 -07:00
fsck_zfs Fix typos in cmd/ 2019-08-30 09:43:30 -07:00
mount_zfs Fix memleak in cmd/mount_zfs.c 2020-11-11 11:09:31 -08:00
raidz_test Unconditionally enable debugging for libzpool 2020-07-10 15:30:31 -07:00
vdev_id Silence 'make checkbashisms' 2020-08-20 13:45:47 -07:00
zdb zil_parse: make callback parameters const 2020-10-16 13:01:53 -07:00
zed zed syslog entries drop important info 2020-10-19 11:24:52 -07:00
zfs Update references to nonexistent man pages in code 2020-10-30 16:04:41 -07:00
zfs_ids_to_path Use abs_top_builddir when referencing libraries 2020-07-10 14:26:32 -07:00
zgenhostid cmd/zgenhostid: replace with simple c implementation 2020-09-18 12:37:54 -07:00
zhack Unconditionally enable debugging for libzpool 2020-07-10 15:30:31 -07:00
zinject Use abs_top_builddir when referencing libraries 2020-07-10 14:26:32 -07:00
zpool Assertion failure when logging large output of channel program 2020-11-14 10:51:21 -08:00
zstream Add support to decode a resume token 2020-07-23 17:44:03 -07:00
zstreamdump Minor zstream redup command fixes 2020-04-10 21:10:09 -07:00
ztest Rename refcount.h to zfs_refcount.h 2020-07-29 16:35:33 -07:00
zvol_id Replace ZFS on Linux references with OpenZFS 2020-10-16 13:01:24 -07:00
zvol_wait zvol_wait should ignore redacted zvols 2019-11-06 10:51:19 -08:00
Makefile.am Small program that converts a dataset id and an object id to a path 2020-05-20 10:05:33 -07:00