Add option to skip content write in sync

This commit is contained in:
Andrea Mazzoleni 2016-05-17 23:17:31 +02:00
parent bec310d50b
commit 4298a238e9
3 changed files with 14 additions and 2 deletions

View file

@ -1552,8 +1552,12 @@ int state_sync(struct snapraid_state* state, block_off_t blockstart, block_off_t
* Instead, saving the new content file in advance, keeps track of all the parity
* that may be modified.
*/
if (state->need_write)
state_write(state);
if (!state->opt.skip_content_write) {
if (state->need_write)
state_write(state);
} else {
log_fatal("WARNING! Skipped state write for --test-skip-content-write option.\n");
}
msg_progress("Syncing...\n");