mirror of
https://github.com/amadvance/snapraid.git
synced 2026-12-03 05:10:16 -05:00
Avoid to recompute the block status multiple times
Store it in a bit vector and reuse the result.
This commit is contained in:
parent
f0a5268d32
commit
2a5b5499c4
7 changed files with 59 additions and 31 deletions
|
|
@ -217,8 +217,7 @@ struct snapraid_io {
|
|||
block_off_t block_start;
|
||||
block_off_t block_max;
|
||||
block_off_t block_next;
|
||||
int (*block_is_enabled)(void* arg, block_off_t);
|
||||
void* block_arg;
|
||||
bit_vect_t* block_enabled;
|
||||
|
||||
/**
|
||||
* Buffers for data.
|
||||
|
|
@ -315,7 +314,7 @@ void io_done(struct snapraid_io* io);
|
|||
*/
|
||||
extern void (*io_start)(struct snapraid_io* io,
|
||||
block_off_t blockstart, block_off_t blockmax,
|
||||
int (*block_is_enabled)(void* arg, block_off_t), void* blockarg);
|
||||
bit_vect_t* block_enabled);
|
||||
|
||||
/**
|
||||
* Stop all the worker threads.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue