Only use readahead flag if passed in
authorJamie Cameron <jcameron@webmin.com>
Fri, 12 Aug 2011 18:53:13 +0000 (11:53 -0700)
committerJamie Cameron <jcameron@webmin.com>
Fri, 12 Aug 2011 18:53:13 +0000 (11:53 -0700)
lvm/lvm-lib.pl

index 53e65ce..655d73d 100755 (executable)
@@ -407,7 +407,8 @@ if ($_[0]->{'is_snap'}) {
 else {
        $cmd .= " -p ".quotemeta($_[0]->{'perm'});
        $cmd .= " -C ".quotemeta($_[0]->{'alloc'});
-       $cmd .= " -r ".quotemeta($_[0]->{'readahead'});
+       $cmd .= " -r ".quotemeta($_[0]->{'readahead'})
+               if ($_[0]->{'readahead'});
        $cmd .= " -i ".quotemeta($_[0]->{'stripe'})
                if ($_[0]->{'stripe'});
        $cmd .= " -I ".quotemeta($_[0]->{'stripesize'})