From 8ca0a87eda33c693fc7c60a9008b8c6e66a2f365 Mon Sep 17 00:00:00 2001 From: Heinz Mauelshagen Date: Wed, 26 Jun 2013 18:06:07 +0200 Subject: [PATCH] thin_metadata_size: check for block size > 0 --- thin-provisioning/thin_metadata_size | 1 + 1 file changed, 1 insertion(+) diff --git a/thin-provisioning/thin_metadata_size b/thin-provisioning/thin_metadata_size index 04e9eb7..4d10c4f 100755 --- a/thin-provisioning/thin_metadata_size +++ b/thin-provisioning/thin_metadata_size @@ -37,6 +37,7 @@ end def check_opts(opts) abort "#{$prg} - 3 arguments required!" if opts.length < 3 + abort "#{$prg} - block size must be > 0" if opts[:blocksize] <= 0 abort "#{$prg} - poolsize must be much larger than blocksize" if opts[:poolsize] < opts[:blocksize] abort "#{$prg} - maximum number of thin provisioned devices must be > 0" if opts[:maxthins].nil? || opts[:maxthins] == 0 end