thin_metadata_size: check for block size > 0

This commit is contained in:
Heinz Mauelshagen 2013-06-26 18:06:07 +02:00
parent 66d8dd4e28
commit 0e8c077415

View File

@ -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