[linux-lvm] typo in CVS: LVM/kernel/lvm.c

Heinz J. Mauelshagen Mauelshagen at sistina.com
Mon May 7 10:34:57 UTC 2001


On Sun, May 06, 2001 at 10:11:33AM +0100, Joe Thornber wrote:
> On Sat, May 05, 2001 at 11:24:43PM +0200, Gergely Tamas wrote:
> > Hi!
> > 
> > There is a typo in CVS:LVM/kernel/lvm.c
> > 
> > Gergely
> 
> Yes, I just looked at cvs, you're right.  Thanks.
> 
> Heinz & Patrick what are you playing at !?
> 
> lvm.c revision 1.10
> -------------------
> 
> o why did you feel the need to change the name of __update_hardblocksize ?
> 

Just to adopt the new naming in > 2.4.3

> o why change the name of the max_hardblocksize variable.

Same as above.

> 
> o you've duplicated ~10 lines of code instead of putting them into a seperate 
>   function such as:

No, just added the (wrong) version check and function call.

> 
>   static inline ulong _get_hard_block_size(kdev_t dev) {
>       etc.
>   }

I don't mind.

> 
> o The code has a typo 'get_hardbsect_size' from which we can conclude that it
>   was *never* compiled for a kernel < 2.4.4

Oops, my fault ;-)

> 
> o The version check itself is wrong.
> 
> It looks to me like a botched search and replace without subsequent
> testing, or even a cvs diff before checkin.

May be... ;-)

> 
> lvm.c revision 1.11
> -------------------
> 
> o typo still there, it can't have been tested.
> 
> lvm.c revision 1.12
> -------------------
> 
> Patrick, you correctly fix most of the remaining mistakes apart from
> the version number.  But what are all the other code changes that have
> slipped in ?  They aren't mentioned in the checkin message, are they
> meant to be there ?
> 
> - Joe
> 
> 
> 
> > 
> > --- LVM/kernel/lvm.c.orig	Thu May  3 15:37:19 2001
> > +++ LVM/kernel/lvm.c	Sat May  5 23:01:22 2001
> > @@ -1879,7 +1879,7 @@
> >  	int max_hardsectsize = 0, hardsectsize;
> > 
> >  	for (le = 0; le < lv->lv_allocated_le; le++) {
> > -#if LINUX_VERSION_CODE <= KERNEL_VERSION ( 2, 4, 4)
> > +#if LINUX_VERSION_CODE <= KERNEL_VERSION ( 2, 4, 3)
> >  		hardsectsize = get_hardblocksize(lv->lv_current_pe[le].dev);
> >  #else
> >  		hardsectsize = get_hardsect_size(lv->lv_current_pe[le].dev);
> > @@ -1892,7 +1892,7 @@
> > 
> >  	if (lv->lv_access & LV_SNAPSHOT) {
> >  		for (e = 0; e < lv->lv_remap_end; e++) {
> > -#if LINUX_VERSION_CODE <= KERNEL_VERSION ( 2, 4, 4)
> > +#if LINUX_VERSION_CODE <= KERNEL_VERSION ( 2, 4, 3)
> >  			hardsectsize = get_hardblocksize( lv->lv_block_exception[e].rdev_new);
> >  #else
> >  			hardsectsize = get_hardsect_size( lv->lv_block_exception[e].rdev_new);
> > 
> > 
> > 
> > _______________________________________________
> > linux-lvm mailing list
> > linux-lvm at sistina.com
> > http://lists.sistina.com/mailman/listinfo/linux-lvm
> _______________________________________________
> linux-lvm mailing list
> linux-lvm at sistina.com
> http://lists.sistina.com/mailman/listinfo/linux-lvm

-- 

Regards,
Heinz    -- The LVM Guy --

*** Software bugs are stupid.
    Nevertheless it needs not so stupid people to solve them ***

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Heinz Mauelshagen                                 Sistina Software Inc.
Senior Consultant/Developer                       Am Sonnenhang 11
                                                  56242 Marienrachdorf
                                                  Germany
Mauelshagen at Sistina.com                           +49 2626 141200
                                                       FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-



More information about the linux-lvm mailing list