mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-27 04:32:16 +03:00
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
This commit is contained in:
committed by
Brian Behlendorf
parent
3874220932
commit
cec3a0a1bb
+7
-1
@@ -167,6 +167,12 @@ enum zio_encrypt {
|
||||
#define ZIO_FAILURE_MODE_CONTINUE 1
|
||||
#define ZIO_FAILURE_MODE_PANIC 2
|
||||
|
||||
typedef enum zio_suspend_reason {
|
||||
ZIO_SUSPEND_NONE = 0,
|
||||
ZIO_SUSPEND_IOERR,
|
||||
ZIO_SUSPEND_MMP,
|
||||
} zio_suspend_reason_t;
|
||||
|
||||
enum zio_flag {
|
||||
/*
|
||||
* Flags inherited by gang, ddt, and vdev children,
|
||||
@@ -610,7 +616,7 @@ extern enum zio_checksum zio_checksum_dedup_select(spa_t *spa,
|
||||
extern enum zio_compress zio_compress_select(spa_t *spa,
|
||||
enum zio_compress child, enum zio_compress parent);
|
||||
|
||||
extern void zio_suspend(spa_t *spa, zio_t *zio);
|
||||
extern void zio_suspend(spa_t *spa, zio_t *zio, zio_suspend_reason_t);
|
||||
extern int zio_resume(spa_t *spa);
|
||||
extern void zio_resume_wait(spa_t *spa);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user