From e9756461af9ebd184a851b8d90b861a7401e946d Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Fri, 16 Jan 2026 00:42:40 +0100 Subject: [PATCH] Failing to flush is an I/O error --- cmdline/state.c | 2 +- cmdline/sync.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmdline/state.c b/cmdline/state.c index 895ff4e6..000e7ca3 100644 --- a/cmdline/state.c +++ b/cmdline/state.c @@ -5100,7 +5100,7 @@ int state_flush(struct snapraid_state* state, struct snapraid_io* io, struct sna int ret = parity_sync(&parity_handle[l]); if (ret == -1) { /* LCOV_EXCL_START */ - log_tag("parity_error:%u:%s: Sync error\n", blockcur, lev_config_name(l)); + log_tag("parity_error_io:%u:%s: Sync error\n", blockcur, lev_config_name(l)); log_fatal("DANGER! Unexpected sync error in %s disk.\n", lev_name(l)); log_fatal("Ensure that disk '%s' is sane.\n", lev_config_name(l)); return -1; diff --git a/cmdline/sync.c b/cmdline/sync.c index ba780a91..de546353 100644 --- a/cmdline/sync.c +++ b/cmdline/sync.c @@ -1323,7 +1323,7 @@ static int state_sync_process(struct snapraid_state* state, struct snapraid_pari if (ret == -1) { /* LCOV_EXCL_START */ log_fatal("Stopping at block %u\n", blockcur); - ++error; + ++io_error; goto bail; /* LCOV_EXCL_STOP */ } @@ -1358,7 +1358,7 @@ static int state_sync_process(struct snapraid_state* state, struct snapraid_pari if (ret == -1) { /* LCOV_EXCL_START */ log_fatal("Stopping at block %u\n", blockcur); - ++error; + ++io_error; goto bail; /* LCOV_EXCL_STOP */ } @@ -1382,7 +1382,7 @@ end: if (ret == -1) { /* LCOV_EXCL_START */ log_fatal("Stopping at block %u\n", blockcur); - ++error; + ++io_error; goto bail; /* LCOV_EXCL_STOP */ }