mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-26 19:01:57 -04:00
Add regression check for Btrfs
It requires root privileges as it has to create Btrfs filesystems.
This commit is contained in:
parent
c843812bb0
commit
f791f76b4e
7 changed files with 142 additions and 59 deletions
|
|
@ -1431,14 +1431,15 @@ end:
|
|||
/* now the parity is fully written, no need to keep deallocated files */
|
||||
state_commit(state);
|
||||
|
||||
/* save the new state if required */
|
||||
if (!state->opt.kill_after_sync) {
|
||||
if ((state->need_write || state->opt.force_content_write))
|
||||
state_write(state);
|
||||
} else {
|
||||
log_fatal(EUSER, "WARNING! Skipped writing state due to --test-kill-after-sync option.\n");
|
||||
if (state->opt.kill_after_sync) {
|
||||
log_fatal(EUSER, "WARNING! Killing due --test-kill-after-sync option.\n");
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
/* save the new state if required */
|
||||
if ((state->need_write || state->opt.force_content_write))
|
||||
state_write(state);
|
||||
|
||||
state_usage_print(state);
|
||||
|
||||
if (soft_error || silent_error || io_error) {
|
||||
|
|
@ -1677,6 +1678,11 @@ 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) {
|
||||
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) {
|
||||
ret = state_sync_process(state, parity_handle, blockstart, blockmax);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue