mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-20 23:16:28 -05:00
Defer pending snapshot promotion until parity sync
This commit is contained in:
parent
950d4a0b10
commit
fbd9b9ea49
48 changed files with 1076 additions and 682 deletions
|
|
@ -1686,13 +1686,16 @@ int state_sync(struct snapraid_state* state, block_off_t blockstart, block_off_t
|
|||
log_fatal(EUSER, "WARNING! Skipped state write for --test-skip-content-write option.\n");
|
||||
}
|
||||
|
||||
if (state->opt.kill_before_sync) {
|
||||
/* 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 (state->opt.kill_before_sync) {
|
||||
log_fatal(EUSER, "WARNING! Killing due --test-kill-before-sync option.\n");
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
/* skip degenerated cases of empty parity, or skipping all */
|
||||
if (blockstart < blockmax) {
|
||||
} 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