* [LVM2 PATCH] Fix 'lvconvert -s' to work again
@ 2007-08-09 17:52 Jun'ichi Nomura
2007-08-09 22:21 ` Dave Wysochanski
0 siblings, 1 reply; 2+ messages in thread
From: Jun'ichi Nomura @ 2007-08-09 17:52 UTC (permalink / raw)
To: lvm-devel
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.
Thanks,
--
Jun'ichi Nomura, NEC Corporation of America
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lvm2-lvconvert-fix-arg-mixture-check.patch
Type: text/x-patch
Size: 655 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/lvm-devel/attachments/20070809/0a718685/attachment.bin>
^ permalink raw reply [flat|nested] 2+ messages in thread
* [LVM2 PATCH] Fix 'lvconvert -s' to work again
2007-08-09 17:52 [LVM2 PATCH] Fix 'lvconvert -s' to work again Jun'ichi Nomura
@ 2007-08-09 22:21 ` Dave Wysochanski
0 siblings, 0 replies; 2+ messages in thread
From: Dave Wysochanski @ 2007-08-09 22:21 UTC (permalink / raw)
To: lvm-devel
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-08-09 22:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-09 17:52 [LVM2 PATCH] Fix 'lvconvert -s' to work again Jun'ichi Nomura
2007-08-09 22:21 ` Dave Wysochanski
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.