mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-26 10:51:54 -04:00
Mark sync as incomplete on SIGINT during thermal cooldown to prevent premature commit
This commit is contained in:
parent
e8726ce95a
commit
9db5dc5ed1
1 changed files with 9 additions and 1 deletions
|
|
@ -1693,8 +1693,16 @@ static int state_sync_process(struct snapraid_state* state, struct snapraid_pari
|
|||
/* drop until now */
|
||||
state_usage_waste(state);
|
||||
|
||||
if (os_signal_interrupt())
|
||||
if (os_signal_interrupt()) {
|
||||
/*
|
||||
* Mark the sync as incomplete on interruption during cooldown.
|
||||
* Partial progress is flushed and durable (*sync_durable = 1), but
|
||||
* completed-sync operations (state_commit() and snapshot promotion)
|
||||
* must not be executed.
|
||||
*/
|
||||
alert = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* autosave */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue