Expose zpool guids through kstats

There are times when end-users may wish to have
a fast and convenient method to get zpool guid
without having to use libzfs. This commit
exposes the zpool guid via kstats in similar
manner to the zpool state.

Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Andrew Walker <awalker@ixsystems.com>
Closes #13466
This commit is contained in:
Andrew
2022-05-18 12:25:33 -05:00
committed by GitHub
parent c0cf6ed679
commit 00ac77464e
2 changed files with 49 additions and 0 deletions
+1
View File
@@ -898,6 +898,7 @@ typedef struct spa_stats {
spa_history_kstat_t tx_assign_histogram;
spa_history_list_t mmp_history;
spa_history_kstat_t state; /* pool state */
spa_history_kstat_t guid; /* pool guid */
spa_history_kstat_t iostats;
} spa_stats_t;