mirror_zfs/cmd/zpool
Olaf Faaland cec3a0a1bb 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-03-15 10:56:55 -07:00
..
zpool.d Add SMART self-test results to zpool status -c 2018-02-27 09:31:27 -08: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-02-27 09:31:27 -08:00
zpool_iter.c Add libtpool (thread pools) 2017-08-09 15:31:08 -07:00
zpool_main.c Report pool suspended due to MMP 2018-03-15 10:56:55 -07:00
zpool_util.c Add libtpool (thread pools) 2017-08-09 15:31:08 -07:00
zpool_util.h Add libtpool (thread pools) 2017-08-09 15:31:08 -07:00
zpool_vdev.c Fix 'zpool add' handling of nested interior VDEVs 2017-12-28 10:15:32 -08:00