diff options
author | Olaf Faaland <[email protected]> | 2018-03-15 10:56:55 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2018-03-15 10:56:55 -0700 |
commit | cec3a0a1bb08574260a9e39301a24ce79dbfb69a (patch) | |
tree | e1001369e5229c9b304b67b371b1096496deedeb /include/sys/spa_impl.h | |
parent | 38742209322b5b3d93635a4820b2f9c755aadee8 (diff) |
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 <[email protected]>
Reviewed-by: Giuseppe Di Natale <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Tony Hutter <[email protected]>
Signed-off-by: Olaf Faaland <[email protected]>
Closes #7296
Diffstat (limited to 'include/sys/spa_impl.h')
-rw-r--r-- | include/sys/spa_impl.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/sys/spa_impl.h b/include/sys/spa_impl.h index 66fcafd9c..af1d6aef0 100644 --- a/include/sys/spa_impl.h +++ b/include/sys/spa_impl.h @@ -236,7 +236,7 @@ struct spa { zio_t *spa_suspend_zio_root; /* root of all suspended I/O */ kmutex_t spa_suspend_lock; /* protects suspend_zio_root */ kcondvar_t spa_suspend_cv; /* notification of resume */ - uint8_t spa_suspended; /* pool is suspended */ + zio_suspend_reason_t spa_suspended; /* pool is suspended */ uint8_t spa_claiming; /* pool is doing zil_claim() */ boolean_t spa_debug; /* debug enabled? */ boolean_t spa_is_root; /* pool is root */ |