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 <rob.norris@klarasystems.com>
(cherry picked from commit 3fa696404fb40205ed631538c62ec1a54d8ee6cd)
This commit is contained in:
Rob Norris 2023-05-08 20:15:40 +10:00 committed by Geoff Amey
parent 3aea149bf8
commit b0d75996ba
1 changed files with 6 additions and 4 deletions

View File

@ -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);
}
mutex_enter(&spa->spa_suspend_lock);