Fixes a crash if a file is deleted during a sync/scrub.

This commit is contained in:
Andrea Mazzoleni 2013-12-03 18:40:19 +01:00
parent a7d6b86b7b
commit 52eb4675d3
4 changed files with 21 additions and 12 deletions

4
dry.c
View file

@ -71,7 +71,7 @@ static int state_dry_process(struct snapraid_state* state, struct snapraid_parit
/* close the old one, if any */
ret = handle_close(&handle[j]);
if (ret == -1) {
fprintf(stderr, "DANGER! Unexpected close error in a data disk, it isn't possible to rehash.\n");
fprintf(stderr, "DANGER! Unexpected close error in a data disk, it isn't possible to dry.\n");
printf("Stopping at block %u\n", i);
++error;
goto bail;
@ -80,7 +80,7 @@ static int state_dry_process(struct snapraid_state* state, struct snapraid_parit
/* open the file only for reading */
ret = handle_open(&handle[j], block_file_get(block), state->opt.skip_sequential, stdlog);
if (ret == -1) {
fprintf(stderr, "DANGER! Unexpected open error in a data disk, it isn't possible to rehash.\n");
fprintf(stderr, "DANGER! Unexpected open error in a data disk, it isn't possible to dry.\n");
printf("Stopping at block %u\n", i);
++error;
goto bail;