Print the outofparity explanation at the end

Otherwise it could scroll away.
This commit is contained in:
Andrea Mazzoleni 2016-09-30 18:40:54 +02:00
parent 51c60ebcdd
commit eb039e8186

View file

@ -121,7 +121,7 @@ void parity_overflow(struct snapraid_state* state, data_off_t size)
{
tommy_node* i;
block_off_t blockalloc;
int first = 1;
int found = 0;
char esc_buffer[ESC_MAX];
/* don't report if everything is outside or if the file is not accessible */
@ -143,17 +143,18 @@ void parity_overflow(struct snapraid_state* state, data_off_t size)
if (file->blockmax > 0) {
block_off_t parity_pos = fs_file2par_get(disk, file, file->blockmax - 1);
if (parity_pos >= blockalloc) {
found = 0;
log_tag("outofparity:%s:%s\n", disk->name, esc_tag(file->sub, esc_buffer));
if (first) {
first = 0;
log_fatal("\nYour data requires more parity than the available space.\n");
log_fatal("Please move the files 'outofparity' to another data disk:\n");
}
log_fatal("outofparity %s%s\n", disk->dir, file->sub);
}
}
}
}
if (found) {
log_fatal("\nYour data requires more parity than the available space.\n");
log_fatal("Please move the files 'outofparity' to another data disk.\n");
}
}
void parity_size(struct snapraid_parity_handle* handle, data_off_t* out_size)