Extend --force-device to ignore more erroneous conditions

We want to allow fix also if some disk is unaccessible,
and content files not present.
This commit is contained in:
Andrea Mazzoleni 2015-10-16 23:17:38 +02:00
parent 841e6306e3
commit 3e83b15bbb
12 changed files with 223 additions and 83 deletions

View file

@ -1927,6 +1927,12 @@ int state_check(struct snapraid_state* state, int fix, block_off_t blockstart, b
/* if fixing, create the file and open for writing */
/* if it fails, we cannot continue */
for (l = 0; l < state->level; ++l) {
/* skip parity disks that are not accessible */
if (state->parity[l].skip_access) {
parity_ptr[l] = 0;
continue;
}
parity_ptr[l] = &parity[l];
ret = parity_create(parity_ptr[l], state->parity[l].path, &out_size, state->file_mode);
if (ret == -1) {