mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-29 11:26:48 -05:00
Change the interface for parity allocation
This will allow a more compact representation of the parity allocation
This commit is contained in:
parent
2801634aa4
commit
0407c945db
15 changed files with 449 additions and 286 deletions
|
|
@ -619,7 +619,7 @@ static int file_post(struct snapraid_state* state, int fix, unsigned i, struct s
|
|||
continue;
|
||||
}
|
||||
|
||||
block = disk_block_get(disk, i);
|
||||
block = fs_par2block_get(disk, i);
|
||||
if (!block_has_file(block)) {
|
||||
/* if no file, nothing to do */
|
||||
continue;
|
||||
|
|
@ -819,7 +819,7 @@ static int block_is_enabled(struct snapraid_state* state, block_off_t i, struct
|
|||
if (!handle[j].disk)
|
||||
continue;
|
||||
|
||||
block = disk_block_get(handle[j].disk, i);
|
||||
block = fs_par2block_get(handle[j].disk, i);
|
||||
|
||||
/* try to recover all files, even the ones without hash */
|
||||
/* because in some cases we can recover also them */
|
||||
|
|
@ -943,7 +943,7 @@ static int state_check_process(struct snapraid_state* state, int fix, struct sna
|
|||
}
|
||||
|
||||
/* if the disk block is not used */
|
||||
block = disk_block_get(disk, i);
|
||||
block = fs_par2block_get(disk, i);
|
||||
if (block == BLOCK_EMPTY) {
|
||||
/* use an empty block */
|
||||
memset(buffer[j], 0, state->block_size);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue