mirror of
https://github.com/amadvance/snapraid.git
synced 2026-12-04 13:50:09 -05:00
Print the outofparity explanation at the end
Otherwise it could scroll away.
This commit is contained in:
parent
51c60ebcdd
commit
eb039e8186
1 changed files with 7 additions and 6 deletions
|
|
@ -121,7 +121,7 @@ void parity_overflow(struct snapraid_state* state, data_off_t size)
|
||||||
{
|
{
|
||||||
tommy_node* i;
|
tommy_node* i;
|
||||||
block_off_t blockalloc;
|
block_off_t blockalloc;
|
||||||
int first = 1;
|
int found = 0;
|
||||||
char esc_buffer[ESC_MAX];
|
char esc_buffer[ESC_MAX];
|
||||||
|
|
||||||
/* don't report if everything is outside or if the file is not accessible */
|
/* 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) {
|
if (file->blockmax > 0) {
|
||||||
block_off_t parity_pos = fs_file2par_get(disk, file, file->blockmax - 1);
|
block_off_t parity_pos = fs_file2par_get(disk, file, file->blockmax - 1);
|
||||||
if (parity_pos >= blockalloc) {
|
if (parity_pos >= blockalloc) {
|
||||||
|
found = 0;
|
||||||
log_tag("outofparity:%s:%s\n", disk->name, esc_tag(file->sub, esc_buffer));
|
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);
|
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)
|
void parity_size(struct snapraid_parity_handle* handle, data_off_t* out_size)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue