From e927c8d90525768d799ca6b0efaf582d18669e34 Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Tue, 13 Mar 2012 23:55:09 +0100 Subject: [PATCH] Invalidates the parity also if there is a DELETED block. --- check.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/check.c b/check.c index deeebbe8..83cec906 100644 --- a/check.c +++ b/check.c @@ -476,6 +476,12 @@ static int state_check_process(struct snapraid_state* state, int fix, struct sna if (block == BLOCK_DELETED) { /* use an empty block */ memset(buffer[j], 0, state->block_size); + + /* mark the parity as invalid, and don't try to check/fix it */ + /* because it will be recomputed at the next sync */ + /* note that for sure there is also another block invalidating */ + /* the parity, but for completeness we invalidate it also here */ + check_parity = 0; /* store it in the failed set, because potentially */ /* the parity may be still computed with the previous content */