From f0ed6c744872ec6dc4838947ffc597f4d141864a Mon Sep 17 00:00:00 2001 From: Tony Hutter Date: Wed, 6 Jun 2018 09:33:54 -0700 Subject: 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 Reviewed-by: Brian Behlendorf Reviewed by: Richard Elling Signed-off-by: Tony Hutter Closes #7331 Closes #7563 --- include/libzfs.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/libzfs.h') 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 */ -- cgit v1.2.3