mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-21 15:36:33 -05:00
Add the "maybe" function also to par2block
This commit is contained in:
parent
83889b4fbb
commit
74fa6e9274
10 changed files with 41 additions and 24 deletions
|
|
@ -175,11 +175,11 @@ static void scan_file_allocate(struct snapraid_scan* scan, struct snapraid_file*
|
|||
snapraid_info info;
|
||||
|
||||
/* increment the position until the first really free block */
|
||||
while (block_has_file(fs_par2block_get(disk, parity_pos)))
|
||||
while (block_has_file(fs_par2block_maybe(disk, parity_pos)))
|
||||
++parity_pos;
|
||||
|
||||
/* get block we are going to overwrite, if any */
|
||||
over_block = fs_par2block_get(disk, parity_pos);
|
||||
over_block = fs_par2block_maybe(disk, parity_pos);
|
||||
|
||||
/* deallocate it */
|
||||
if (over_block != BLOCK_EMPTY)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue