mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
Add pool state /proc entry, "SUSPENDED" pools
1. Add a proc entry to display the pool's state: $ cat /proc/spl/kstat/zfs/tank/state ONLINE This is done without using the spa config locks, so it will never hang. 2. Fix 'zpool status' and 'zpool list -o health' output to print "SUSPENDED" instead of "ONLINE" for suspended pools. Reviewed-by: Olaf Faaland <faaland1@llnl.gov> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed by: Richard Elling <Richard.Elling@RichardElling.com> Signed-off-by: Tony Hutter <hutter2@llnl.gov> Closes #7331 Closes #7563
This commit is contained in:
committed by
Brian Behlendorf
parent
2d9142c9d4
commit
f0ed6c7448
@@ -873,6 +873,7 @@ typedef struct spa_stats {
|
||||
spa_stats_history_t tx_assign_histogram;
|
||||
spa_stats_history_t io_history;
|
||||
spa_stats_history_t mmp_history;
|
||||
spa_stats_history_t state; /* pool state */
|
||||
} spa_stats_t;
|
||||
|
||||
typedef enum txg_state {
|
||||
@@ -1048,6 +1049,8 @@ extern void spa_history_log_internal_ds(struct dsl_dataset *ds, const char *op,
|
||||
extern void spa_history_log_internal_dd(dsl_dir_t *dd, const char *operation,
|
||||
dmu_tx_t *tx, const char *fmt, ...);
|
||||
|
||||
extern const char *spa_state_to_name(spa_t *spa);
|
||||
|
||||
/* error handling */
|
||||
struct zbookmark_phys;
|
||||
extern void spa_log_error(spa_t *spa, const zbookmark_phys_t *zb);
|
||||
|
||||
Reference in New Issue
Block a user