mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-26 01:46:32 -05:00
Clarify CHG block handling during interrupted sync recovery
This commit is contained in:
parent
3893bd2845
commit
19b7dba214
2 changed files with 18 additions and 2 deletions
|
|
@ -61,6 +61,11 @@ int handle_create(struct snapraid_handle* handle, struct snapraid_file* file, in
|
|||
/* check if exists a .unrecoverable copy, and rename to the real one */
|
||||
pathprint(path_from, sizeof(path_from), "%s.unrecoverable", handle->path);
|
||||
|
||||
/*
|
||||
* Reuse a previous partial recovery as the starting point for a
|
||||
* multistep fix. Readable CHG blocks in this file are intentionally
|
||||
* preserved because their current hash is not available.
|
||||
*/
|
||||
if (rename(path_from, handle->path) == 0) {
|
||||
/* open for read write */
|
||||
handle->f = open(handle->path, flags | O_RDWR);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue