mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-26 10:51:54 -04:00
Adds a check about the maximum number of disks.
This commit is contained in:
parent
cae50bbeba
commit
6ac6d994a6
1 changed files with 6 additions and 0 deletions
6
state.c
6
state.c
|
|
@ -735,6 +735,12 @@ static void state_map(struct snapraid_state* state)
|
|||
++hole;
|
||||
}
|
||||
|
||||
if (hole > 255) {
|
||||
/* RAID6 P/Q parity works for up to 255 drives, no more */
|
||||
fprintf(stderr, "Too many disks. No more than 255.\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
/* insert the new mapping */
|
||||
map = map_alloc(disk->name, hole, "");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue