mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-21 07:26:29 -05:00
Restores the modification time of files in fixing.
This commit is contained in:
parent
e6b02b7d2d
commit
66e9c359fd
15 changed files with 226 additions and 67 deletions
19
sync.c
19
sync.c
|
|
@ -116,14 +116,17 @@ static int state_sync_process(struct snapraid_state* state, int parity_f, int qa
|
|||
continue;
|
||||
}
|
||||
|
||||
ret = handle_close_if_different(&handle[j], block_file_get(block));
|
||||
if (ret == -1) {
|
||||
/* This one is really an unexpected error, because we are only reading */
|
||||
/* and closing a descriptor should never fail */
|
||||
fprintf(stderr, "DANGER! Unexpected close error in a data disk, it isn't possible to sync.\n");
|
||||
printf("Stopping at block %u\n", i);
|
||||
++unrecoverable_error;
|
||||
goto bail;
|
||||
/* if the file is different than the current one, close it */
|
||||
if (handle[j].file != block_file_get(block)) {
|
||||
ret = handle_close(&handle[j]);
|
||||
if (ret == -1) {
|
||||
/* This one is really an unexpected error, because we are only reading */
|
||||
/* and closing a descriptor should never fail */
|
||||
fprintf(stderr, "DANGER! Unexpected close error in a data disk, it isn't possible to sync.\n");
|
||||
printf("Stopping at block %u\n", i);
|
||||
++unrecoverable_error;
|
||||
goto bail;
|
||||
}
|
||||
}
|
||||
|
||||
ret = handle_open(&handle[j], block_file_get(block));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue