diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/libzfs.h | 2 | ||||
-rw-r--r-- | include/spl/sys/kstat.h | 7 | ||||
-rw-r--r-- | include/sys/spa.h | 3 |
3 files changed, 8 insertions, 4 deletions
diff --git a/include/libzfs.h b/include/libzfs.h index 7ea6d7fa0..b98963158 100644 --- a/include/libzfs.h +++ b/include/libzfs.h @@ -301,6 +301,8 @@ int zfs_dev_is_whole_disk(char *dev_name); char *zfs_get_underlying_path(char *dev_name); char *zfs_get_enclosure_sysfs_path(char *dev_name); +const char *zpool_get_state_str(zpool_handle_t *); + /* * Functions to manage pool properties */ diff --git a/include/spl/sys/kstat.h b/include/spl/sys/kstat.h index 9170fe24e..f197ce455 100644 --- a/include/spl/sys/kstat.h +++ b/include/spl/sys/kstat.h @@ -69,10 +69,9 @@ #define KSTAT_FLAG_WRITABLE 0x04 #define KSTAT_FLAG_PERSISTENT 0x08 #define KSTAT_FLAG_DORMANT 0x10 -#define KSTAT_FLAG_UNSUPPORTED \ - (KSTAT_FLAG_VAR_SIZE | KSTAT_FLAG_WRITABLE | \ - KSTAT_FLAG_PERSISTENT | KSTAT_FLAG_DORMANT) - +#define KSTAT_FLAG_INVALID 0x20 +#define KSTAT_FLAG_LONGSTRINGS 0x40 +#define KSTAT_FLAG_NO_HEADERS 0x80 #define KS_MAGIC 0x9d9d9d9d diff --git a/include/sys/spa.h b/include/sys/spa.h index 8a3938e86..e8578be9a 100644 --- a/include/sys/spa.h +++ b/include/sys/spa.h @@ -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); |