mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-26 19:01:57 -04:00
Some more assertions
This commit is contained in:
parent
36b20e5d0e
commit
881add341f
1 changed files with 5 additions and 0 deletions
|
|
@ -75,6 +75,9 @@ static void io_reader_sched(struct snapraid_io* io, int task_index, block_off_t
|
|||
task->disk = worker->handle->disk;
|
||||
else
|
||||
task->disk = 0;
|
||||
|
||||
assert(worker->buffer_skew + i < io->buffer_max);
|
||||
|
||||
task->buffer = io->buffer_map[task_index][worker->buffer_skew + i];
|
||||
task->position = blockcur;
|
||||
task->block = 0;
|
||||
|
|
@ -915,6 +918,8 @@ void io_init(struct snapraid_io* io, struct snapraid_state* state,
|
|||
|
||||
io->state = state;
|
||||
|
||||
assert(buffer_max >= handle_max + parity_handle_max);
|
||||
|
||||
/* initialize bandwidth limiting */
|
||||
bw_init(&io->bw, state->opt.bwlimit);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue