A bug in report.c? WAS: [linux-lvm] vg attributes (vg_attr) in vgs program don't seem to match the man page

Jun'ichi Nomura j-nomura at ce.jp.nec.com
Tue Mar 27 01:00:29 UTC 2007


ben scott wrote:
> The following lines in report.c seems to show that (c) will become (C) if the 
> lv is locked:
> That is also what the man page claims. However the start of report.c show 
> this: 
>  switch (alloc) {
>         case ALLOC_CONTIGUOUS:
>                 return 'c';
>         case ALLOC_CLING:
>                 return 'C';
> Isn't that a conflict, or am I reading this wrong? BTW I am not a professional 
> programmer nor do I play one on TV. 

It's a bug.
I added the cling allocation policy and assigned 'C' to it
without checking the capitalization part of the report function...
Thanks for finding it.

Sorry about this bug.
IMO, 'C' for ALLOC_CLING should be changed to other letter since it's
added after the capitalization.
It inevitably introduces possible compatibility issues for existing
user of attr field, however.

Jun'ichi Nomura, NEC Corporation of America

More information about the linux-lvm mailing list