diff --git a/cmdline/parity.c b/cmdline/parity.c index 30d66dbc..8181dab6 100644 --- a/cmdline/parity.c +++ b/cmdline/parity.c @@ -577,6 +577,12 @@ int parity_chsize(struct snapraid_parity_handle* handle, struct snapraid_parity* } } + /* if we cannot allocate all the space */ + if (size != 0) { + log_fatal("Failed to allocate all the required parity space. You miss %" PRIu64 " bytes.\n", size); + return -1; + } + /* now copy the new size in the parity data */ if (is_modified) *is_modified = 0; diff --git a/cmdline/sync.c b/cmdline/sync.c index 617f1578..6db07311 100644 --- a/cmdline/sync.c +++ b/cmdline/sync.c @@ -1518,7 +1518,7 @@ int state_sync(struct snapraid_state* state, block_off_t blockstart, block_off_t data_off_t out_size; parity_size(&parity_handle[l], &out_size); parity_overflow(state, out_size); - log_fatal("WARNING! Without an accessible %s file, it isn't possible to sync.\n", lev_name(l)); + log_fatal("WARNING! Without an unsable %s file, it isn't possible to sync.\n", lev_name(l)); exit(EXIT_FAILURE); /* LCOV_EXCL_STOP */ }