Add level knownledge to parity handle

This commit is contained in:
Andrea Mazzoleni 2015-12-30 14:22:43 +01:00
parent a279333c0b
commit 3c00248aa6
6 changed files with 12 additions and 9 deletions

View file

@ -1258,7 +1258,7 @@ int state_sync(struct snapraid_state* state, block_off_t blockstart, block_off_t
/* create the file and open for writing */
parity_ptr[l] = &parity[l];
ret = parity_create(parity_ptr[l], state->parity[l].path, &out_size, state->file_mode);
ret = parity_create(parity_ptr[l], l, state->parity[l].path, &out_size, state->file_mode);
if (ret == -1) {
/* LCOV_EXCL_START */
log_fatal("WARNING! Without an accessible %s file, it isn't possible to sync.\n", lev_name(l));