]> git.proxmox.com Git - mirror_zfs.git/commit - module/zfs/spa.c
Report pool suspended due to MMP
authorOlaf Faaland <faaland1@llnl.gov>
Thu, 15 Mar 2018 17:56:55 +0000 (10:56 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 15 Mar 2018 17:56:55 +0000 (10:56 -0700)
commitcec3a0a1bb08574260a9e39301a24ce79dbfb69a
treee1001369e5229c9b304b67b371b1096496deedeb
parent38742209322b5b3d93635a4820b2f9c755aadee8
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
cmd/zpool/zpool_main.c
include/libzfs.h
include/sys/fs/zfs.h
include/sys/spa_impl.h
include/sys/zio.h
lib/libzfs/libzfs_status.c
module/zfs/mmp.c
module/zfs/spa.c
module/zfs/spa_misc.c
module/zfs/zio.c