[lvm-devel] [LVM2 PATCH] Fix 'lvconvert -s' to work again

Dave Wysochanski dwysocha at redhat.com
Thu Aug 9 22:21:19 UTC 2007


On Thu, 2007-08-09 at 13:52 -0400, Jun'ichi Nomura wrote:
> Hi,
> 
> In current CVS head, 'lvconvert -s' doesn't work.
>  # lvconvert -s testvg/lvol0 testvg/lvol1
>  --snapshots argument cannot be mixed with --mirrors or --log
>  lvconvert: Change logical volume layout
> 
> This is due to the lvconvert parameter check uses
> 'count' variable uninitialized for non-mirror case.
>         int count;
> ...
>         if (arg_count(cmd, log_ARG) || arg_count(cmd, mirrors_ARG))
>                 count = 1;
>         count += arg_count(cmd, snapshot_ARG);
> 
> While the code around the _read_params() could be tidied up
> some more, I hope this fix is included for now.
> 

Looks like an obvious initialization bug.




More information about the lvm-devel mailing list