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
Brian Behlendorf
parent
e35704647e
commit
7125a109dc
+2
-1
@@ -432,7 +432,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