From b0d75996bafb935f899cbbf85a8bb892b2e5501e Mon Sep 17 00:00:00 2001 From: Rob Norris Date: Mon, 8 May 2023 20:15:40 +1000 Subject: [PATCH] zio: don't report suspend IOs if the pool is already suspended This can happen if the pool suspended and then new IO is issued which then fails too. This doesn't change behaviour, just silences the noise. Signed-off-by: Rob Norris (cherry picked from commit 3fa696404fb40205ed631538c62ec1a54d8ee6cd) --- module/zfs/zio.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/module/zfs/zio.c b/module/zfs/zio.c index 43cdb7c44e..45397d89bb 100644 --- a/module/zfs/zio.c +++ b/module/zfs/zio.c @@ -2400,11 +2400,13 @@ zio_suspend(spa_t *spa, zio_t *zio, zio_suspend_reason_t reason) "failure and the failure mode property for this pool " "is set to panic.", spa_name(spa)); - cmn_err(CE_WARN, "Pool '%s' has encountered an uncorrectable I/O " - "failure and has been suspended.\n", spa_name(spa)); + if (!spa_suspended(spa)) { + cmn_err(CE_WARN, "Pool '%s' has encountered an uncorrectable " + "I/O failure and has been suspended.\n", spa_name(spa)); - (void) zfs_ereport_post(FM_EREPORT_ZFS_IO_FAILURE, spa, NULL, - NULL, NULL, 0); + (void) zfs_ereport_post(FM_EREPORT_ZFS_IO_FAILURE, spa, NULL, + NULL, NULL, 0); + } mutex_enter(&spa->spa_suspend_lock);