From 47b571790a428361db6d28970b3ec400cbaafdd0 Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Sun, 26 Mar 2017 12:02:18 +0200 Subject: [PATCH] Allow adding new splits when using content file with 'P' command --- cmdline/state.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmdline/state.c b/cmdline/state.c index de40142f..62c6a291 100644 --- a/cmdline/state.c +++ b/cmdline/state.c @@ -2655,8 +2655,10 @@ static void state_read_content(struct snapraid_state* state, const char* path, S /* if we use this parity entry */ if (v_level < state->level) { + /* if the configuration has more splits, keep them */ + if (state->parity[v_level].split_mac < 1) + state->parity[v_level].split_mac = 1; /* set the parity info */ - state->parity[v_level].split_mac = 1; pathcpy(state->parity[v_level].split_map[0].uuid, sizeof(state->parity[v_level].split_map[0].uuid), v_uuid); state->parity[v_level].total_blocks = v_total_blocks; state->parity[v_level].free_blocks = v_free_blocks;