]> git.proxmox.com Git - mirror_zfs.git/commit - tests/zfs-tests/tests/functional/kstat/Makefile.am
Add pool state /proc entry, "SUSPENDED" pools
authorTony Hutter <hutter2@llnl.gov>
Wed, 6 Jun 2018 16:33:54 +0000 (09:33 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 6 Jun 2018 16:33:54 +0000 (09:33 -0700)
commitf0ed6c744872ec6dc4838947ffc597f4d141864a
treec82a6cc535f94c2a1f7656b2224195d9c2b81eda
parent2d9142c9d4c9db4edcef4777fecfafa4832610cb
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
18 files changed:
cmd/zpool/zpool_main.c
configure.ac
include/libzfs.h
include/spl/sys/kstat.h
include/sys/spa.h
lib/libspl/include/sys/kstat.h
lib/libzfs/libzfs_pool.c
lib/libzfs/libzfs_status.c
module/spl/spl-kstat.c
module/zfs/spa_misc.c
module/zfs/spa_stats.c
tests/runfiles/linux.run
tests/zfs-tests/include/blkdev.shlib
tests/zfs-tests/tests/functional/Makefile.am
tests/zfs-tests/tests/functional/kstat/Makefile.am [new file with mode: 0644]
tests/zfs-tests/tests/functional/kstat/cleanup.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/kstat/setup.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/kstat/state.ksh [new file with mode: 0755]