mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-25 01:16:31 -05:00
Defer pending snapshot promotion until parity sync
This commit is contained in:
parent
554adc9048
commit
6cab8e3909
48 changed files with 352 additions and 145 deletions
|
|
@ -1691,8 +1691,13 @@ int state_sync(struct snapraid_state* state, block_off_t blockstart, block_off_t
|
|||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
/* skip degenerated cases of empty parity, or skipping all */
|
||||
if (blockstart < blockmax) {
|
||||
/* make the scanned state available for recovery before changing parity */
|
||||
if (state_snapshot_pending(state) != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
++process_error;
|
||||
/* continue, as we are already exiting */
|
||||
/* LCOV_EXCL_STOP */
|
||||
} else if (blockstart < blockmax) {
|
||||
ret = state_sync_process(state, parity_handle, blockstart, blockmax);
|
||||
if (ret == -1) {
|
||||
/* LCOV_EXCL_START */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue