diff --git a/TODO b/TODO index 23df6abd..9b2214c9 100644 --- a/TODO +++ b/TODO @@ -3,8 +3,6 @@ SnapRAID TODO This is the list of TODO items for SnapRAID. -* Check blockmax in hole ? RISKY ?? - - v4.x * If a content file is missing, sync should rewrite it, even if no change was done at the content. diff --git a/state.c b/state.c index 98fe6557..9c5c2226 100644 --- a/state.c +++ b/state.c @@ -1091,12 +1091,12 @@ static void state_read_text(struct snapraid_state* state, const char* path, STRE exit(EXIT_FAILURE); } - /* note that here we don't have a valid blockmax because we have not */ - /* yet processed all the disks with all the files */ - /* and then we cannot ensure that v_pos < blockmax */ - deleted->block.parity_pos = v_pos; + /* keep track of the max block number used in parity */ + if (v_pos + 1 > blockmax) + blockmax = v_pos + 1; + /* read the hash */ c = sgetc(f); if (c != ' ') {