mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-21 23:46:27 -05:00
Unified the two --force-realloc logics
This commit is contained in:
parent
966583e6f0
commit
f89d5fa4f3
3 changed files with 25 additions and 18 deletions
|
|
@ -2232,15 +2232,6 @@ static void state_read_content(struct snapraid_state* state, const char* path, S
|
|||
block_state_set(block, BLOCK_STATE_CHG);
|
||||
}
|
||||
|
||||
/* if we want a full reallocation, marks block as invalid parity */
|
||||
/* note that we do this after the force_nocopy option */
|
||||
/* to avoid to mixup the two things */
|
||||
if (state->opt.force_realloc && state->opt.parity_tail == 0
|
||||
&& block_state_get(block) == BLOCK_STATE_BLK) {
|
||||
/* convert from BLK to REP */
|
||||
block_state_set(block, BLOCK_STATE_REP);
|
||||
}
|
||||
|
||||
/* set the parity association */
|
||||
fs_allocate(disk, v_pos, file, v_idx);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue