mirror_zfs/cmd/zpool
Olaf Faaland 3eb3a13628 Report pool suspended due to MMP
When the pool is suspended, record whether it was due to an I/O error or
due to MMP writes failing to succeed within the required time.

Change spa_suspended from uint8_t to zio_suspend_reason_t to store the
reason.

When userspace queries pool status via spa_tryimport(), report the
reason the pool was suspended in a new key,
ZPOOL_CONFIG_SUSPENDED_REASON.

In libzfs, when interpreting the returned config nvlist, report
suspension due to MMP with a new pool status enum value,
ZPOOL_STATUS_IO_FAILURE_MMP.

In status_callback(), which generates and emits the message when 'zpool
status' is executed, add a case to print an appropriate message for the
new pool status enum value.

Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Signed-off-by: Olaf Faaland <faaland1@llnl.gov>
Closes #7296
2018-05-07 17:19:56 -07:00
..
zpool.d Add SMART self-test results to zpool status -c 2018-03-14 16:10:37 -07:00
.gitignore Add .gitignore files to exclude build products 2010-01-08 11:35:17 -08:00
Makefile.am Add SMART self-test results to zpool status -c 2018-03-14 16:10:37 -07:00
zpool_iter.c Restrict zpool iostat/status -c to search path 2017-07-24 11:53:59 -07:00
zpool_main.c Report pool suspended due to MMP 2018-05-07 17:19:56 -07:00
zpool_util.c codebase style improvements for OpenZFS 6459 port 2017-01-22 13:25:40 -08:00
zpool_util.h zpool iostat/status -c improvements 2017-06-05 10:52:15 -07:00
zpool_vdev.c Fix 'zpool add' handling of nested interior VDEVs 2018-01-30 10:27:31 -06:00