#72 LVM task:move_extent incorrect option parsing

open
nobody
None
5
2006-04-07
2006-04-07
`Moe`
No

a) This doesn't work:

task:move_extent,lvm/foo/bar,le=2425,pv=hda1,pe=11660

b) While this works:

task:move_extent,lvm/foo/bar,le=2425,pe=11660,pv=hda1

Note the order of the parameters.

In the case of (b), I get the following entries in
the debug log:

LvmRegMgr: lvm_move_extent_set_option: Setting option
1
[...]
LvmRegMgr: lvm_move_extent_set_option: Setting option
2
[...]
LvmRegMgr: lvm_move_extent_set_option: Setting option
0

Note the backwards order.

The debug log shows for (a):

LvmRegMgr: lvm_move_extent_set_option: Setting option
2

and of course, failure after that (since option 1,
PV, is not set before).

As a user, I'd expect that order of options is
irrelevant - after all, I'm using "pv=", "le=", "pe="
prefixes.

Discussion