From d8689465a583c79d5d2435c914f41b0c4cb9e1e6 Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Fri, 1 Nov 2013 08:38:13 +0100 Subject: [PATCH] Updates some sync comments. --- sync.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sync.c b/sync.c index e4c538ff..0b80118b 100644 --- a/sync.c +++ b/sync.c @@ -185,6 +185,9 @@ static int state_sync_process(struct snapraid_state* state, struct snapraid_pari /* it could happens that all the blocks are EMPTY/BLK and CHG but with the hash */ /* still matching because the specific CHG block was not modified. */ + /* Note that CHG/DELETED blocks already present in the content file loaded */ + /* have the hash cleared, and then they won't never match the hash. */ + /* We are treating only CHG blocks created at runtime. */ /* In such case, we can avoid to update parity, because it would be the same as before */ parity_needs_to_be_updated = 0; @@ -212,7 +215,7 @@ static int state_sync_process(struct snapraid_state* state, struct snapraid_pari /* get the block */ block = disk_block_get(handle[j].disk, i); - /* if the block is new or removed, we have to update the parity */ + /* if the block is NEW or DELETED, we have to update the parity */ /* to include this block change */ if (!block_has_same_presence(block)) { parity_needs_to_be_updated = 1;