]> sourceware.org Git - lvm2.git/commitdiff
writecache: reject invalid high/low watermark setting
authorDavid Teigland <teigland@redhat.com>
Mon, 3 Feb 2020 17:33:30 +0000 (11:33 -0600)
committerDavid Teigland <teigland@redhat.com>
Mon, 3 Feb 2020 17:33:30 +0000 (11:33 -0600)
tools/lvconvert.c

index d0d277bcdcef183befe730a6cbb7fc42d7ea6365..f6a329b228f0ebd6d57519b02e6abf207856f077 100644 (file)
@@ -5504,6 +5504,12 @@ static int _get_writecache_settings(struct cmd_context *cmd, struct writecache_s
                }
        }
 
+       if (settings->high_watermark_set && settings->low_watermark_set &&
+           (settings->high_watermark <= settings->low_watermark)) {
+               log_error("High watermark must be greater than or equal to low watermark.");
+               return 0;
+       }
+
        return 1;
 }
 
This page took 0.109406 seconds and 5 git commands to generate.