mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-24 17:06:25 -05:00
Eliminate obsolete raid_zero API and dedicated zero buffers
Some checks are pending
Build / build-mac (push) Waiting to run
Build / build-linux (push) Waiting to run
Build / build-arm32 (push) Waiting to run
Build / build-win (push) Waiting to run
Build / build-freebsd (push) Waiting to run
Build / build-musl (push) Waiting to run
CodeQL Advanced / Analyze (c-cpp) (push) Waiting to run
CodeQL Advanced / Analyze (actions) (push) Waiting to run
Some checks are pending
Build / build-mac (push) Waiting to run
Build / build-linux (push) Waiting to run
Build / build-arm32 (push) Waiting to run
Build / build-win (push) Waiting to run
Build / build-freebsd (push) Waiting to run
Build / build-musl (push) Waiting to run
CodeQL Advanced / Analyze (c-cpp) (push) Waiting to run
CodeQL Advanced / Analyze (actions) (push) Waiting to run
This commit is contained in:
parent
8f27c393d6
commit
0b64fb2eae
7 changed files with 66 additions and 68 deletions
|
|
@ -940,8 +940,6 @@ static int state_sync_process(struct snapraid_state* state, struct snapraid_pari
|
|||
unsigned diskmax;
|
||||
block_off_t blockcur;
|
||||
unsigned j;
|
||||
void* zero_alloc;
|
||||
void** zero;
|
||||
void* copy_alloc;
|
||||
void** copy;
|
||||
unsigned buffermax;
|
||||
|
|
@ -981,11 +979,6 @@ static int state_sync_process(struct snapraid_state* state, struct snapraid_pari
|
|||
/* allocate the copy buffer */
|
||||
copy = malloc_nofail_vector_align(diskmax, state->block_size, ©_alloc);
|
||||
|
||||
/* allocate and fill the zero buffer */
|
||||
zero = malloc_nofail_align(state->block_size, &zero_alloc);
|
||||
memset(zero, 0, state->block_size);
|
||||
raid_zero(zero);
|
||||
|
||||
failed = nalloc_nofail(diskmax, sizeof(struct failed_struct));
|
||||
failed_map = nalloc_nofail(diskmax, sizeof(unsigned));
|
||||
|
||||
|
|
@ -1799,7 +1792,6 @@ bail:
|
|||
}
|
||||
|
||||
free(handle);
|
||||
free(zero_alloc);
|
||||
free(copy_alloc);
|
||||
free(copy);
|
||||
free(rehandle_alloc);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue