mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-19 22:46:36 -05:00
Prints list of files outside the parity if growing is not possible.
This commit is contained in:
parent
3a8f21a839
commit
8373233f25
6 changed files with 114 additions and 26 deletions
7
sync.c
7
sync.c
|
|
@ -353,6 +353,7 @@ int state_sync(struct snapraid_state* state, block_off_t blockstart, block_off_t
|
|||
{
|
||||
block_off_t blockmax;
|
||||
data_off_t size;
|
||||
data_off_t size_after;
|
||||
tommy_node* i;
|
||||
int ret;
|
||||
struct snapraid_parity parity;
|
||||
|
|
@ -394,16 +395,18 @@ int state_sync(struct snapraid_state* state, block_off_t blockstart, block_off_t
|
|||
|
||||
/* create the file and open for writing */
|
||||
parity_ptr = &parity;
|
||||
ret = parity_create(parity_ptr, state->parity, size);
|
||||
ret = parity_create(parity_ptr, state->parity, size, &size_after);
|
||||
if (ret == -1) {
|
||||
parity_overflow(state, size_after);
|
||||
fprintf(stderr, "WARNING! Without an accessible Parity file, it isn't possible to sync.\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
if (state->level >= 2) {
|
||||
qarity_ptr = &qarity;
|
||||
ret = parity_create(qarity_ptr, state->qarity, size);
|
||||
ret = parity_create(qarity_ptr, state->qarity, size, &size_after);
|
||||
if (ret == -1) {
|
||||
parity_overflow(state, size_after);
|
||||
fprintf(stderr, "WARNING! Without an accessible Q-Parity file, it isn't possible to sync.\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue