freebsd-src/cddl/contrib/opensolaris/lib
Mark Johnston 4cbba6ae24 MFOpenZFS: Fix zpool history unbounded memory usage
In original implementation, zpool history will read the whole history
before printing anything, causing memory usage goes unbounded. We fix
this by breaking it into read-print iterations.

Reviewed-by: Tom Caputi <tcaputi@datto.com>
Reviewed-by: Matt Ahrens <matt@delphix.com>
Reviewed-by: Igor Kozhukhov <igor@dilos.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Chunwei Chen <david.chen@nutanix.com>
Closes #9516

Note, this change changes the libzfs.so ABI by modifying the prototype
of zpool_get_history().  Since libzfs is effectively private to the base
system it is anticipated that this will not be a problem.

PR:		247557
Obtained from:	OpenZFS
Reported and tested by:	Sam Vaughan <samjvaughan@gmail.com>
Discussed with:	freqlabs
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D25745
openzfs/zfs@7125a109dc
2020-07-23 14:21:45 +00:00
..
libcmdutils MFV r325013,r325034: 640 number_to_scaled_string is duplicated in several commands 2017-10-27 12:37:22 +00:00
libctf/common Reference stdint.h types in ctf.5. 2019-07-17 16:31:50 +00:00
libdtrace Restore the binary compatibility for link_map l_addr. 2020-05-21 22:24:23 +00:00
libgen/common Mechanically convert cddl sun #ifdef's to illumos 2015-01-17 14:44:59 +00:00
libnvpair MFV r337223: 2018-08-03 01:52:25 +00:00
libuutil/common cddl/contrib/opensolaris/lib/libuutil/common/uu_avl.c 2014-03-07 23:01:35 +00:00
libzfs/common MFOpenZFS: Fix zpool history unbounded memory usage 2020-07-23 14:21:45 +00:00
libzfs_core/common MFOpenZFS: Add basic zfs ioc input nvpair validation 2020-06-23 06:42:39 +00:00
libzpool/common vfs: add a file missed in r356337 2020-01-03 22:47:31 +00:00
pyzfs/common MFV r260154 + 260182: 2014-01-02 07:34:36 +00:00