HomeFreeBSD

spa_prop_get: require caller to supply output nvlist

Description

spa_prop_get: require caller to supply output nvlist

All callers to spa_prop_get() and spa_prop_get_nvlist() supplied their
own preallocated nvlist (except ztest), so we can remove the option to
have them allocate one if none is supplied.

This sidesteps a bug in spa_prop_get(), where the error var wasn't
initialised, which could lead to the provided nvlist being freed at the
end.

Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
Reviewed-by: Jorgen Lundman <lundman@lundman.net>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Signed-off-by: Rob Norris <rob.norris@klarasystems.com>
Closes #16505

Details

Provenance
rob.norris_klarasystems.comAuthored on Sep 6 2024, 3:45 PM
GitHub <noreply@github.com>Committed on Sep 6 2024, 3:45 PM
Parents
rG17dd66dedab9: zpool events: expand value strings for ZIO error values
Branches
Unknown
Tags
Unknown