From: Mike Snitzer Date: Fri, 15 Jan 2010 17:46:08 +0000 (+0000) Subject: Detect case of both merging_store and cow_store supplied in X-Git-Tag: v2_02_91~2361 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=eb9454ab68e0debcd96b91f47b625f3d010e0f04;p=lvm2.git Detect case of both merging_store and cow_store supplied in _snap_text_import(). --- diff --git a/lib/snapshot/snapshot.c b/lib/snapshot/snapshot.c index d1dd1223f..0a8212aac 100644 --- a/lib/snapshot/snapshot.c +++ b/lib/snapshot/snapshot.c @@ -46,9 +46,14 @@ static int _snap_text_import(struct lv_segment *seg, const struct config_node *s old_suppress = log_suppress(1); - /* FIXME Detect case of both merging_store and cow_store supplied */ - if ((cow_name = find_config_str(sn, "merging_store", NULL))) + if ((cow_name = find_config_str(sn, "merging_store", NULL))) { + if (find_config_str(sn, "cow_store", NULL)) { + log_suppress(old_suppress); + log_error("Both snapshot cow and merging storage were specified."); + return 0; + } merge = 1; + } else if (!(cow_name = find_config_str(sn, "cow_store", NULL))) { log_suppress(old_suppress); log_error("Snapshot cow storage not specified.");