mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +03:00
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
This commit is contained in:
committed by
Tony Hutter
parent
635603a1c2
commit
c6eaa8b7f9
+2
-1
@@ -425,7 +425,8 @@ typedef enum {
|
||||
extern char *zpool_vdev_name(libzfs_handle_t *, zpool_handle_t *, nvlist_t *,
|
||||
int name_flags);
|
||||
extern int zpool_upgrade(zpool_handle_t *, uint64_t);
|
||||
extern int zpool_get_history(zpool_handle_t *, nvlist_t **);
|
||||
extern int zpool_get_history(zpool_handle_t *, nvlist_t **, uint64_t *,
|
||||
boolean_t *);
|
||||
extern int zpool_events_next(libzfs_handle_t *, nvlist_t **, int *, unsigned,
|
||||
int);
|
||||
extern int zpool_events_clear(libzfs_handle_t *, int *);
|
||||
|
||||
Reference in New Issue
Block a user