mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-26 10:51:54 -04:00
Avoid the limitation of 255 disks for the IO subsystem
This commit is contained in:
parent
d2edddea0a
commit
5a664a4100
2 changed files with 6 additions and 6 deletions
|
|
@ -570,7 +570,7 @@ static struct snapraid_task* io_task_read_thread(struct snapraid_io* io, unsigne
|
|||
thread_mutex_lock(&io->io_mutex);
|
||||
|
||||
while (1) {
|
||||
unsigned char* let;
|
||||
unsigned* let;
|
||||
unsigned busy_index;
|
||||
|
||||
/* get the index the IO is using */
|
||||
|
|
@ -658,7 +658,7 @@ static void io_parity_write_thread(struct snapraid_io* io, unsigned* pos, unsign
|
|||
thread_mutex_lock(&io->io_mutex);
|
||||
|
||||
while (1) {
|
||||
unsigned char* let;
|
||||
unsigned* let;
|
||||
unsigned busy_index;
|
||||
|
||||
/* get the next index the IO is going to use */
|
||||
|
|
@ -952,9 +952,9 @@ void io_init(struct snapraid_io* io, struct snapraid_state* state,
|
|||
}
|
||||
|
||||
io->reader_map = malloc_nofail(sizeof(struct snapraid_worker) * io->reader_max);
|
||||
io->reader_list = malloc_nofail(io->reader_max + 1);
|
||||
io->reader_list = malloc_nofail(sizeof(unsigned) * (io->reader_max + 1));
|
||||
io->writer_map = malloc_nofail(sizeof(struct snapraid_worker) * io->writer_max);
|
||||
io->writer_list = malloc_nofail(io->writer_max + 1);
|
||||
io->writer_list = malloc_nofail(sizeof(unsigned) * (io->writer_max + 1));
|
||||
|
||||
io->data_base = 0;
|
||||
io->data_count = handle_max;
|
||||
|
|
|
|||
|
|
@ -294,8 +294,8 @@ struct snapraid_io {
|
|||
* To get the next element to process we use i = list[i + 1].
|
||||
* The end is when i == reader_max.
|
||||
*/
|
||||
unsigned char* reader_list;
|
||||
unsigned char* writer_list;
|
||||
unsigned* reader_list;
|
||||
unsigned* writer_list;
|
||||
|
||||
/**
|
||||
* Exit condition for all threads.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue