]> sourceware.org Git - lvm2.git/commitdiff
Detect case of both merging_store and cow_store supplied in
authorMike Snitzer <snitzer@redhat.com>
Fri, 15 Jan 2010 17:46:08 +0000 (17:46 +0000)
committerMike Snitzer <snitzer@redhat.com>
Fri, 15 Jan 2010 17:46:08 +0000 (17:46 +0000)
_snap_text_import().

lib/snapshot/snapshot.c

index d1dd1223fb5a4c03a8384097504093692d0893b6..0a8212aaca6f088234b2d57867395d1c31041064 100644 (file)
@@ -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.");
This page took 0.034025 seconds and 5 git commands to generate.