[linux-lvm] get_hardblocksize and kernel 2.4.4

Heinz J. Mauelshagen Mauelshagen at sistina.com
Mon Apr 30 16:01:38 UTC 2001


Thanks Gergely for providing this patch.

Will integrate it.

On Sat, Apr 28, 2001 at 11:26:01AM +0200, Gergely Tamas wrote:
> Hi!
> 
> Kernel 2.4.4 changed the get_hardblocksize function into
> get_hardsect_size. LVM 0.9.1b7(lvm.c) uses get_hardblocksize so the kernel
> can't be compiled.
> 
> The following patch solves this problem ...
> 
> Gergely
> 
> --- lvm.c.orig	Sat Apr 28 10:48:37 2001
> +++ lvm.c	Sat Apr 28 11:07:07 2001
> @@ -1791,7 +1791,7 @@
>  	int max_hardblocksize = 0, hardblocksize;
> 
>  	for (le = 0; le < lv->lv_allocated_le; le++) {
> -		hardblocksize = get_hardblocksize(lv->lv_current_pe[le].dev);
> +		hardblocksize = get_hardsect_size(lv->lv_current_pe[le].dev);
>  		if (hardblocksize == 0)
>  			hardblocksize = 512;
>  		if (hardblocksize > max_hardblocksize)
> @@ -1801,7 +1801,7 @@
>  	if (lv->lv_access & LV_SNAPSHOT) {
>  		for (e = 0; e < lv->lv_remap_end; e++) {
>  			hardblocksize =
> -				get_hardblocksize(
> +				get_hardsect_size(
>  					lv->lv_block_exception[e].rdev_new);
>  			if (hardblocksize == 0)
>  				hardblocksize = 512;
> 
> _______________________________________________
> 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